1
我有我(在的applicationDidFinishLaunching)的設置我的應用程序,像這樣:iphone-dev的:TabBarItem幫助
mytable = [[[MyTableController alloc] initWithStyle:UITableViewStylePlain] retain];
UINavigationController *mynav = [[[UINavigationController alloc]initWithRootViewController:mytable] autorelease];
[mynav.view setFrame:CGRectMake(0,0,320,460)];
UIViewController *tab1 = [[tabBarController viewControllers] objectAtIndex:0];
[mytable setTitle:@"Chronological"];
mytable.navigationController = mynav;
[tab1.view addSubview:mynav.view];
[window addSubview:tab1.view];
其中MyTableController延伸UITableController並具有導航控制器屬性。 tabBarController是通過主要nib文件的插座。沒有其他的nib文件。
我現在無法將任何按鈕添加到導航控制器。我所做的一切都被忽略了。我在這裏做錯了什麼?
'[[[MyTableController頁頭] initWithStyle:UITableViewStylePlain]保留]':頁頭已經做了保留。你保留得太多 – user102008 2010-12-03 23:31:08