How to load viewController from nib file
I have a Tab bar base project (along with navigation controls), inside a specific tab there is a tableViewLoaded, when I click on the table rows, they open another view, i.e. it pushes another controller, I have a view controller in MainWindow.nib for this views also with some elements like button labels, but if I click on it it doesn't display anything other than just a blank page, can anyone help me on this.
0
Vparab
source
to share
1 answer
Typically, you should use one view control file for each file; it makes things a lot easier. A few things to check:
- Whether your view controller object has been created (set a breakpoint in init, loadView, or viewDidLoad).
- Your view is displayed (set a breakpoint on your view WillAppear: or viewDidAppear: methods)
- Is your gaze plugged in correctly (make sure the socket in the IB is plugged in correctly, this is a common mistake).
If your question is actually how to load a nib file that is paired with a UIViewController subclass, take a look at the UIViewController -initWithNibName: bundle: and -loadView methods.
+5
source to share