How to implement view controller programmatically:
1. create a new view controller inherited from UIViewController.
2. implement the UI detail in method -(void)loadView;
3. Initializer this view controller by:
MyViewController *controller = [MyViewController initWithNibName:nil bundle:nil];
Example:
1. How to implement a table view controller:
2. How to implement a tab bar view controller: