BLACK FRIDAY: Save 50% on all my Swift books and bundles! >>

What’s new in SwiftUI for iOS 17

This is another huge year of updates, delivering many highly requested features such as advanced scroll view effects, container relative sizing, and even Metal shaders.

Paul Hudson       @twostraws

SwiftUI continues to evolve at a rapid pace, and this year has seen a huge number of improvements to scroll views, fun new SF Symbols effects, advanced support for Metal shaders, and more.

Some of these are things I’ve asked for personally, including the ability to add Metal shaders, making Color work better with Codable, adding a completion closure for animations, allowing us to animate gradients, and being able to selectively round corners of a rectangle – I’ve closed at least a dozen feedbacks just from beta 1!

Save 50% in my WWDC sale.

SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Scroll view improvements

Drawing and animation improvements

More welcome improvements

And there’s more…

You might expect me to talk about SwiftData here, but I’m not – or at least not yet. Yes, it’s important, and yes it’s genuinely a huge step forward for all iOS developers, but I’m spending a lot of time writing test projects, experimenting, and getting answers to my questions, because I want to be really sure I understand it thoroughly before I write about it.

However, there are other interesting SwiftUI changes to discuss:

And although it’s more of an Xcode improvement than a SwiftUI improvement, all images and colors defined in assets catalogs now have static names we can use in code rather than strings: Image(.dog) rather than Image("dog"), for example.

There are also new APIs for performing keyframe animations, new map controls, and more – I’m still digging in, writing code samples, and finding techniques that work well.

I particularly like some of the approaches taken in these new APIs, particularly the way things like scroll bar flashing, sensory feedback, and phase animations can be triggered using a simple Equatable comparison – it really lowers the complexity bar

So what about SwiftData?

The dramatic and wide-ranging changes to data management in SwiftUI are really welcome. In fact, there’s a video of me actually letting out a scream during Apple’s State of the Union session at Apple Park – I’m really glad to see it arrive.

However, it’s also something that takes care to get right. I’ll be updating my books for it – of course! – but I also want to make sure I understand the best practices for using it thoughtfully, so I hope you don’t mind a little delay while I’m conducting all my research.

Thank you for your patience!

Save 50% in my WWDC sale.

SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

BUY OUR BOOKS
Buy Pro Swift Buy Pro SwiftUI Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let us know!

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.