我正在DetailView通过我的表视图的委托类推送视图控制器 ( ) MyClass。
MyClass充当MasterView. 我试图DetailView从“didSelectRowAtIndexPath:”方法推送,MyClass但每次DetailView按下返回的后退按钮都MasterView被禁用。
我的视图推送代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (!detailViewController) {
detailViewController = [[DetailViewController alloc] init];
}
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.navigationController pushViewController:detailViewController animated:YES];
}