Parent class issue - UITableViewController doesn't work
When I access my Search View from my tab 开发者_Go百科bar, the view gets loaded when SearchViewController interface is set like this:
@interface SearchViewController : UIViewController
but it crashes when I set it like this (although it doesn't crash when it is not accessed through the tab bar): @interface SearchViewController : UITableViewController
Why? I need the UITableViewController as I have a table view that I access from the tab bar.
I have found an answer. Your MainWindow.xib file should have a UITabBarController and four view controllers. But, only THE FIRST TWO tabs can be UITableViewControllers (or UIViewControllers), but none except the first two tabs can be UITableViewControllers.
精彩评论