我有LoginViewControllerIphone
实例,我在其中推送实例TasksRootViewControllerIphone
然后在TasksRootViewControllerIphone
(出现后10秒)我打电话 [self.navigationController popViewControllerAnimated:YES];
并收到一个错误:
[NSRecursiveLock isSystemItem]: unrecognized selector sent to instance 0x3ba360
我试图打印导航控制器堆栈:
po [self.navigationController viewControllers]
$2 = 0x003445f0 <__NSArrayI 0x3445f0>(
<LoginViewControllerIphone: 0x3b73c0>,
<TasksRootViewControllerIphone: 0x3af290>
)
所以它有适当的视图控制器。任何想法怎么会发生?
更新:
推送代码:
self.tasksRootViewControllerIphone = [[TasksRootViewControllerIphone alloc] initWithNibName:@"TasksRootViewControllerIphone" bundle:nil];
self.tasksRootViewControllerIphone.view.backgroundColor = [UIColor clearColor];
[self.loginViewControllerIphone.navigationController pushViewController:self.tasksRootViewControllerIphone animated:YES];
在 TasksRootViewControllerIphone.m 我有:
- (void)viewDidLoad
{
[self performSelector:@selector(popCurrentViewControllerAnimated) withObject:self afterDelay:10];
}
- (void)popCurrentViewControllerAnimated
{
[self.navigationController popViewControllerAnimated:YES];
}