ViewController Flashcards
0
Q
There are two ways that a view controller can create its view hierarchy:
A
- programmatically, by overriding the UIViewController method loadView.
- in Interface Builder, by loading a NIB file.
1
Q
A view controller’s view is not created until it needs to appear on the screen. This optimization is called…
A
lazy loading
2
Q
If a view controller is asked for its view and its view is nil, then…
A
the view controller is sent the loadView message.
3
Q
There is a convenient method for adding a view controller’s view hierarchy to the window
A
UIWindow ’s setRootViewController:
4
Q
Setting a view controller as the rootViewController adds that view controller’s view as a…
A
subview of the window.
It also automatically resizes the view to be the same size as the window.