我正在構建我的第一個基本選項卡,具有其中一個視圖的應用程序作爲將顯示視圖控制器的導航控制器。標題欄阻擋的TableView
我運行到一個問題,在該點處,用戶選擇從第一tableview中的類別作爲屏幕截圖所示:http://www.cl.ly/7YOF
當tableviewcontroller的另一個實例被加載並被推到navigationcontroller的堆疊 http://www.cl.ly/7ZRz
表格視圖選擇邏輯是以下:,該表由標題欄阻礙
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { KHCategory *selectedItem = [categoryArray objectAtIndex:indexPath.row]; if (selectedItem.categories.count > 0) { KHCategoryTableViewController *nextCategoryController = [[KHCategoryTableViewController alloc] init]; nextCategoryController.categoryArray = [[NSArray alloc] initWithArray:selectedItem.categories]; nextCategoryController.title = selectedItem.labelValue; [self.navigationController pushViewController:nextCategoryController animated:YES]; [nextCategoryController release]; } else { NSLog(@"show detail view"); } }
編輯: 我應該清楚,KHCategoryTableViewController的一個實例是我的NavigationController的根,NavController連線到TabController的第一個選項卡。
我添加[self.view setAutoresizingMask這個問題成爲解決: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth];到KHCategoryTableViewController的viewDidLoad方法,但沒有幫助。我是否以錯誤的方式去做? – 2011-06-12 22:20:57
我在手動和之後添加了蒙版之前輸出了蒙版的值,並且兩者的結果都是18.因此,UITableViewController視圖蒙版的默認值是18.感謝您的建議。 – 2011-06-13 00:29:03