Take a journey through building a feature-complete app in Swift, and learn how to bring your ideas to life. Designers have great ideas for apps all the time, but how many ideas never get implemented because the designer didn't know how easy it was to put something together from scratch?
The components that are built-in as part of UI Kit are useful, but especially when used just as a starting point for customization. This lesson explores how to subclass an existing UI component to create something truly special.
In this episode, you'll add a bit of functionality to the Saved Locations screen. We need a way to save our current location to the list, and we'll accomplish this by adding a plus button on the Saved Locations tableview controller.
Not everything needs to be written from scratch, and there's tons of useful code out there ready to be integrated into your project. Cocoapods provides a really easy way to do this and to manage dependencies.
The "Saved Locations" screen has had a major flaw to this point — it didn't actually save the list of locations when one was added. We'll be tackling that issue in this lesson, using the UserDefaults system object to save and store our locations.
UserDefaults was a great way to save data but is limited to certain types. In this lesson we'll create a custom Location class that implements the NSCoding protocol so we can save and retrieve more structured data.
TableView cells can handle many kinds of interaction, and sometimes it takes some tweaking to make them behave exactly as you like. Here we'll set the selection styles and set up deletion from the list.
Comparing simple types is of course built into Swift but in our case we want to consider locations equal if the name matches - ignoring the coordinates. This episode covers two ways to handle custom comparison.