In SwiftUI in iOS15 you can use the safeAreaInset modifier to overlay another view that goes into the safe area like you see here.
This could be a bug but the last row of a List doesn't come up above it.
👉 The Fix: Change the List to a ScrollView.
Note: These examples come from a book called SwiftUI Views Mastery which is a picture book reference of SwiftUI views and code that’s almost 1,000 pages.
In SwiftUI (iOS 14+), you can apply the .pickerStyle(.menu) modifier to a Picker view to make it look like a menu when the user taps on the selected picker item button:
Note: These examples come from a book called SwiftUI Views Mastery which is a picture book reference of SwiftUI views and code that’s almost 1,000 pages.
The 6 different #SwiftUI list styles in #iOS will actually present your section headers and footers differently.
Does anyone else see a footer that looks out of place? 🤔
Note: These examples come from a book called SwiftUI Views Mastery which is a picture book reference of SwiftUI views and code that’s almost 1,000 pages.
Here are 6 different list styles in #SwiftUI for #iOS.
I really wish iOS also got the alternate row backgrounds like macOS did.
Originally, I had all of these styles on separate pages. But when referring to them I found I was doing a lot of page flipping. This will help.
Note: These examples come from a book called SwiftUI Views Mastery which is a picture book reference of SwiftUI views and code that’s almost 1,000 pages.
Were you a little sad when SwiftUI first came out because you couldn't adopt it at work yet?
Maybe because it was too new or because you had a UIKit application or there were no new app projects coming up to use it?
You no longer have to wait!
- You don't have to create a whole new project just to start using SwiftUI. - You don't have to think up a whole new app so you have an excuse to use SwiftUI! - And SwiftUI is more mature than it ever has been to use in production.
You can start using SwiftUI right now in your existing UIKit applications!
Whether at work or for a personal project, you can learn some of the lesser-known tools Apple gave us with the release of SwiftUI.
UIKit 🤝 SwiftUI
It was funny to me that Apple hadn't talked more about these tools when SwiftUI first came out. These tools are the bridge from UIKit to SwiftUI. Yet most of their presentations are just about showing SwiftUI by itself.
This made me and many other developers think we had to use SwiftUI only in a NEW app/project.
Allow me to break that myth
You don't need a separate project just for SwiftUI. And if you've been holding off from really getting into SwiftUI because you were going to rewrite an app or create a brand new app then wait no more!
I created a course to walk you through how you can start using SwiftUI in your UIKit apps. I answer some of the most frequent questions developers have, such as:
- How can I leverage my UIKit knowledge toward SwiftUI? - How can I add SwiftUI to my UIKit project? - Can I pass data from a UIViewController a SwiftUI view and back? - What are Property Wrappers and how do they work? - Can SwiftUI be used to create complex UIs? - Can you create Table Views in SwiftUI? - How can I create Collection Views with SwiftUI? - What if SwiftUI does not have a UIKit equivalent?
SwiftUI Weekend Kickstarter Course
This introductory course will answer all of these questions and walk you through how to do all of these things inside a UIKit project. It's a weekend course because you will be able to finish it in one day and not have to devote a whole week just to complete it.
You will be up and running as fast as possible!
Reference Guide
I also added a quick reference guide to all the important pieces of code you'll need to quickly start integrating SwiftUI within your UIKit projects.
So imagine being able to go into work tomorrow knowing you can now use SwiftUI in the UIKit project you have been developing and supporting.
Your next screen in your UIKit project can be built in SwiftUI.