Paul Hudson

@twostraws
11.8K Followers
120 Following
2.9K Posts
I write Swift and write about Swift, but most people prefer my dogs.
Pronounshe/him
Websitehackingwithswift.com
GitHubgithub.com/twostraws
πŸ”₯ What’s new in SwiftUI for iOS 27? SwiftUI keeps getting better, and in this video I cover some of my favorite additions this year, including: Lazy @State, faster compile times, reorderable(), AsyncImage caching, toolbar priority customization, and more! https://www.youtube.com/watch?v=tNxEqyUVGck
What's new in SwiftUI for iOS 27?

YouTube
SwiftUI can render dates as static text, relative timestamps, or even live-updating timers, all from a single Text view. https://www.hackingwithswift.com/quick-start/swiftui/how-to-format-dates-inside-text-views
How to format dates inside text views - a free SwiftUI by Example tutorial

Learn Swift coding for iOS with these free tutorials

Hacking with Swift
@johnvoorhees The MacBook Neo change is particularly sad πŸ˜”

🚨 Announcing our HEADLINER speakers for the FIRST EVER Swiftsonic! 🚨

Come hear from these ROCKSTAR devs in Nashville this November 🀘

Many SF Symbols come with built-in VoiceOver labels ("heart" is automatically read aloud as "love"), and SwiftUI picks the right icon variant for each platform without any extra code. The complete guide: https://www.hackingwithswift.com/articles/237/complete-guide-to-sf-symbols
The Complete Guide to SF Symbols

Example code, tips, and techniques for both SwiftUI and UIKit

Hacking with Swift
@andyzoom01 Apple has released a whole bunch of new agent skills for the 27 releases; I need time to use the APIs, use their skills, and speak to the Apple folks about them to understand the rationale before I'm able to speak usefully about them. It's not something I'm happy to rush into πŸ™‚
For HWS+ subscribers: Every new file gets the same default header comment, but Xcode has a flexible customisation system with built-in macros for filenames, project names, and more. https://www.hackingwithswift.com/plus/learn-something-new/personalizing-your-xcode-header
Personalizing your Xcode header – Hacking with Swift+

We make new files in Xcode all the time, but if you spend just a few minutes you can customize the comments that are automatically placed at the start to make them suit you much better.

Hacking with Swift

RE: https://mastodon.macstories.net/@macstories/116799677346665537

I know a lot of people are jaded about Prime Day, but having spent a year studying Amazon's pricing, there are some truly good deals to be had if you look hard enough, which I did.

I compiled a list of the best deals on a load of gadgets, most of which I've used and reviewed myself.

Renaming a SwiftData property without @Attribute(originalName:) will silently discard your users' data. One small macro saves a lot of heartache. 😬 https://www.hackingwithswift.com/quick-start/swiftdata/how-to-rename-properties-without-losing-data
How to rename properties without losing data - a free SwiftData by Example tutorial

Learn Swift coding for iOS with these free tutorials

Hacking with Swift
Sometimes 64 bits just isn't enough, which is why Swift also support Int128 and UInt128. The evolution proposal itself admits the API is "uninteresting" - but those are very, very big numbers. https://www.hackingwithswift.com/swift/6.0/int128
128-bit Integer Types – available from Swift 6.0

128-bit Integer Types example code from Swift 6.0

Hacking with Swift