开发者

Parent class issue - UITableViewController doesn't work

开发者 https://www.devze.com 2023-01-01 06:35 出处:网络
When I access my Search View from my tab 开发者_Go百科bar, the view gets loaded when SearchViewController interface is set like this:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消