This is where you usually handle application events like; the app being moved into the background and notifications.
This is where is you have the logic of a current screen and to also access any controls that are on the screen. The UIViewController class defines the methods and properties for managing your views, handling events, transitioning from one view controller to another. You subclass UIViewController (or one of its subclasses) and add the custom code you need to implement your app’s behavior.
This where you can layout and customise all the screens in your app. Storyboard’s visual editor allows you to visually see all the screens at once, showing you the user flow of the app.
Notes
-
Each screen is managed by a View Controller and it has a reference to all the controls within it. Each control is a type of UIView that can contain other UIViews, usually referred to as subviews.
-
The View Controller also contains references to Models and this is how it gets Data
- viewDidLoad: called once the VC has been created; which is the first time the VC’s view property is accessed. This is a good place for initialising controls that VC needs.
- viewWillAppear: called right before the view is displayed on screen. This is a good place to populate views from the models. E.g setting the text on a UILabel.
- viewDidAppear: called after the view is displayed
- viewDidLayoutSubviews
- viewWillDisappear: Called before the view disappears from the screen
- viewDidDisappear: Called after the view disappears from the screen
- didReceiveMemoryWarning: called when the device is low on memory, the app will crash if the memory gets too low.
- PLAY button
- Simulators; allows you download more devices
- Different editors; Standard Editor, Assistant Editor and Version Editor/source control.
- Panes; Navigation Area, Debug Area, Inspector, Library, Pre-Packaged Code, Object Library, Media Library