ViewController Flashcards

0
Q

There are two ways that a view controller can create its view hierarchy:

A
  1. programmatically, by overriding the UIViewController method loadView.
  2. in Interface Builder, by loading a NIB file.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

There is a convenient method for adding a view controller’s view hierarchy to the window

A

UIWindow ’s setRootViewController:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly