我们使用导航控制器和视图控制器向用户显示问题。一切工作正常,但我们做了一些用户界面调整,所以我们可以将应用程序移植到iPad上,唯一的变化是使桌面视图的框架动态变为iphone或ipad。但是现在,当我们到达335中的187问题时,它不再推新问题......它推动了一个空白屏幕,并且从未调用推送的视图控制器的“viewDidLoad”方法,因为它已经是过去了187次。我们已经设置了断点,以确保导航控制器和视图控制器仍然分配在内存中,并且它们是。UINavigationController停止推送视图
这里是被称为每次新推视图控制器的viewDidLoad中......
- (void)viewDidLoad {
_tableView = [[QuestionTableView alloc] initWithFrame:self.view.frame style:UITableViewStyleGrouped];
_tableView.center = CGPointMake(self.view.center.x, self.view.frame.size.height/2);
[_tableView setDataSource:self];
[_tableView setQuestionDelegate:self];
[_tableView setDelegate:self];
_tableView.scrollEnabled = YES;
[_tableView setBackgroundView:[[[UIView alloc] init] autorelease]];
_tableView.directionalLockEnabled = YES;
_tableView.delaysContentTouches = NO;
_tableView.backgroundColor = [UIColor clearColor];
_tableView.opaque = NO;
[self.view addSubview:_tableView];
}
我们通过推视图控制器...
[questionsNavigationController pushViewController:viewController animated:YES];
在先进的感谢! :)
也只是想提一提,如果我们在模拟器中运行它没有问题......如果我们在ipad或ipad2上运行它,我们有上面列出的问题 – kilabyte
您在导航堆栈上有187个视图控制器?我会从那里开始... –
没有它的同一个控制器被推入不同的表数据。 – kilabyte