29,027
社区成员
发帖
与我相关
我的任务
分享
- (IBAction)trendButtonClicked:(id)sender {
TrendListCtrlor *trendList = [[TrendListCtrlor alloc] init];
trendList.delegate = self;
UINavigationController *tlNav = [[UINavigationController alloc] initWithRootViewController:trendList];
[self presentModalViewController:tlNav animated:YES];
[tlNav release];
[trendList release];
}
UINavigationController *tlNav = [[UINavigationController alloc] initWithRootViewController:trendList];
是创建一个导航控制器,并将trendList压入到导航控制器栈中,而如果trendList实例本身就是一个UINavigationController 的话,就会报上述的错误了。