Project 4 showed how easy it is to build complex apps: Apple’s WebKit framework contains a complete web browser you can embed into any app that needs HTML to be displayed. That might be a small snippet you’ve generated yourself, or it might be a complete website as seen in project 4.
After that, project 5 showed you how to build your second game, while also sneaking in a little more practice with UITableViewController
. Starting from project 11 we’ll be switching to SpriteKit for games, but there are lots of games you can make in UIKit too.
WebKit is the second external framework we’ve used, after the Social framework in project 3. These frameworks always deliver lots of complex functionality grouped together for one purpose, but you also learned lots of other things too:
ViewController
class so that we can act on them.UIAlertController
with its .actionSheet
style to present the user with options to choose from. We gave it a .cancel
button without a handler, which dismisses the options.UIBarButtonItems
into the toolbarItems
property, then have a UIToolbar
shown by the navigation controller. We also used the .flexibleSpace
button type to make the layout look better.contentsOf
.UIAlertController
for the first time, then read it back using ac?.textFields?[0]
. We’ll be doing this in several other projects in this series.contains()
, remove(at:)
, firstIndex(of:)
.On top of that, we also took a deep-dive into the world of Auto Layout. We used this briefly in projects 1 and 2, but you’ve now learned more ways to organize your designs: Visual Format Language and anchors. There are other ways yet to come, and soon you’ll start to find you prefer one method over another – and that’s OK. I’m showing you them all so you can find what works best for you, and we all have our own preferences!
SAVE 50% To celebrate WWDC23, all our books and bundles are half price, 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.
Link copied to your pasteboard.