Hopefully you felt like these projects started to stretch you a little, not only in pushing your SwiftUI skills further but also teaching you some more advanced Swift. Plus, of course, you also have two new SwiftUI projects that you built – you can go ahead and keep customizing these all you want, put them on GitHub, or perhaps convert them into something else that better suits your tastes.
Here’s a quick recap of all the new things we covered in the last three projects:
@State
works with structs.@Observable
to store data in classes.sheet()
modifier and the dismiss
environment key.onDelete(perform:)
to enable swipe to delete.EditButton
to navigation bar items, to let users edit list data more easily.UserDefaults
.Codable
, including working with data stored in a hierarchy.Identifiable
protocol to make sure all items can be identified uniquely in our user interface.containerRelativeFrame()
to make content fit the screen.ScrollView
to lay out custom views in a scrollable area.NavigationLink
.NavigationPath
.I hope you’ll agree that’s a lot, and it also spans a wide range – we’ve gone from hard-core language features through to user-facing views, with a huge spread in between. Some folks will prefer the pure language stuff and others will prefer the more creative side of coding, and that’s OK – we all learn differently!
TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!
Sponsor Hacking with Swift and reach the world's largest Swift community!
Link copied to your pasteboard.