Loaded "rootView" but did not get a UITableView ".

I developed a cut-based application. And I'm trying to add an image to the root view controller.

To do this, I did RootView.xib manually, and in MainWindow.xib I loaded rootViewController with this xib. But when I try to build it, I get this error.

Any help with this approach or any other approach to adding an image to the root view controller will be greatly appreciated.

+4
source share
2 answers

You may have to change the superclass of the rootViewController class from UITableViewController to UIViewController .

+23
source

If you specifically create a subclass of UITableViewController, you need to change its default load behavior by simply overriding its load view method:

 - (void)loadView { [super loadView]; } 
+7
source

All Articles