Let's start a thread on my best finding in #SwiftUI for iOS 16 exclusively, as I've used it to write #IceCubesApp
The 1.0 about to get released on the App Store (well if Apple finally decide so) so this is a good time for that thread.
1. .toolbar is more powerful than ever. You can use ToolbarTitleMenu to have a complexe menu right in the title of navigation bar. Don't forget you can also use .toolbar with keyboard placement on TextField for keyboard accessory view.
2. .presentationDetents is finally available in #SwiftUI for presenting sheet. You can use medium, large, a fraction of the height of the screen and a totally custom size.
3. New Environment values like .dismiss make it super easy to manage modal. And it's finally seems reliable.
4. One of the biggest iOS 16 news is NavigationStack, Ice Cubes app navigation is super simple. You can reference RouterPath from anywhere, and use the programatic .navigate(to:) API or use a RouteDestinations value for NavigationLink.
5. PhotoPicker is amazing and simple to use. Allow you to easily present the photo library UI and keep track of the selected images to load them into your app.
6. .searchable API is even more powerful now that you can easily use tokens, suggest tokens, decide of the search bar placement etc... I try to use the full extent of it in the app but I could do better.
7. I don't use it in the app yet, but you can now use TextField with a .vertical axis. This is very good for multiline text field. But it's not UITextView yet. And I wish there would be a SwiftUI input field that support AttributedString, for now I have to wrap a UITextView.
• • •
Missing some Tweet in this thread? You can try to
force a refresh