Demystifying Views in iOS
Oct 30 2018 · Video Course (1 hr, 59 mins) · Intermediate
Learn to organize your app ideas and designs in ways that work well with the latest versions of UIKit and Interface Builder. Eradicate View and View Controller confusion!
3.7/5Version
- Swift 4, iOS 12, Xcode 10
Nib Files
Get a little background on what these "views" are, that we'll be demystifying. Then find out the app you'll be building.
1Create a nib file: the predecessor to the storyboard, and still a great option for designing views in Interface Builder.
2Loading Nib Files
8:27Use a Bundle to load a nib, and then integrate the nib into your storyboard – both at runtime, and in Interface Builder.
3File's Owner
6:19A nib file's owner allows it to connect to its external environment using the convenience of Interface Builder outlets and actions.
4You've got a view controller and a file's owner for your nib. If you can hook them together, you'll have successfully integrated interactivity with your nib.
5Nib Outlets
4:52You know how to connect outlets from a nib, to its File's Owner, and from the File's Owner to a view controller. But you can connect inter-nib objects too!
6UINib
5:12Sometimes you'll want to load objects from a nib multiple times. UINib is a better match for those cases than instantiating repeatedly from a Bundle.
7You've used the nib you designed once in a storyboard. Now use it again four times over, all within an entirely new nib!
8Conclusion
1:09You've now learned all about a powerful tool: nib files! Let's review their similarities to storyboards and when nibs are more appropriate.
9Temporary Subviews
Introduction
1:00Part 1 is all about views, and Part 2, view controllers. This part will bridge the gap, with a focus on views that don't stay on-screen all the time.
10Parent Views
8:28Explore, in Swift, how you can take control over subviews (including ones loaded from nibs!) without necessarily using a view controller.
11Learn to integrate a parent view into a view controller. The view controller will have to do some coordination, but its subviews can take over from there.
12Scene Dock
6:04Get some experience designing a view in the Scene Dock. It's a great place to put temporary views that are associated with only one view controller.
13Combine the power of a custom UIView subclass and a Scene Dock object that uses that class. Storyboard scenes are flexible!
14You're not limited to one temporary view in a scene. It's also possible to interact with Scene Dock views, and have them stick around until dismissed.
15Although custom UIView subclasses for Scene Dock views are a helpful tool, they're not always necessary to get the job done. Go without, this time!
16Conclusion
0:35Views in nibs, views in the scene dock, view in parent views: when they're subviews of a view controller and temporary, you've got them down.
17Container View Controllers
Introduction
1:31Before you can convert one of your views to be a controller, get an idea of what a container view controller is, and its role in dependency injection.
18It's time to power up your view to become a view controller! You'll learn to convert from a nib to a storyboard, and get started coding it as well.
19There's a little bit more to worry about when adding a child view controller than there is for just a subview. Let's sort out the extra requirements.
20Embed Segues
8:27Embed segues are an alternative to loading child view controllers in code, After this video, you'll be able to gauge which method is right for your needs.
21It's time to see how much of what you've created for your first contained view controller can be reused for your latest one.
22You'll be making the final view controller for the course, and using one of Apple's own container view controllers with it. Storyboard references make it easy!
23View Models
6:37Come get acquainted with the basics of View Models. You'll define one for a custom view lass, and then manage a collection of them with their view controller.
24You've been coordinating between two parts of the screen with one container view controller. Now coordinate between two screens, with another.
25Conclusion
2:05Review the big ideas of what you've learned in the course. Start considering how all of your new view-organizing skills can benefit you in a team environment.
26
Comments