我是新手。我試圖使用的UITabBarController用的UITableViewController(不UINavigationController的),但我因未捕獲的異常 「NSInternalInconsistencyException」修改STD的TabBar項目嘗試在iOS中使用UITabBarController與UITableViewController時出現異常
終止應用程序後,面臨着異常,原因是:「 - [的UITableViewController loadView]加載了「IHHideView」筆尖,但沒有得到UITableView。
我didFinishLaunching
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
UIViewController *hideViewController = [[IHHideViewController alloc] init];
UIViewController *unhideViewController = [[IHUnhideViewController alloc] init];
UIViewController *filesVIewController = [[IHFilesViewController alloc] init];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = @[hideViewController,unhideViewController,filesVIewController];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
return YES;
}
IHHideViewController剛剛的UITableViewController
@interface IHHideViewController : UITableViewController
@end
據我所知UITableViewController中創建一個具有正確的尺寸和自動調整自己的面具對象的UITableView如果不指定筆尖文件simplesubclass。爲什麼會發生這種異常
Hm ...沒有TabBarController的子類UITableViewController的工作,我期望(無例外)... – KnightOfHell