If you pass nil
as the nibName name, the method will look for a thread with the same file name as your view controller.
For example, if you have a view controller named MyViewController
, it will look for the file MyViewController.xib
nib.
If nib is not found, you need to override the loadView
method to create and assign a UIView in the controller view.
- (void)loadView { UIView *theView = [[UIView alloc] ...
source share