您好我的应用程序中有一个模态视图控制器,当按下某个按钮时,它会消失,并且带有UITableView的视图会使用导航控制器滑动到位。问题是,当我按下那个按钮时,模态视图控制器会消失,但不是导航到下一个视图,应用程序崩溃,我得到以下堆栈:
#0 0x01387a63 in objc_msgSend
#1 0x0634a7d0 in ??
#2 0x003597f2 in -[UITransitionView notifyDidCompleteTransition:]
#3 0x0035a339 in -[UITransitionView _didCompleteTransition:]
#4 0x0652961f in -[UITransitionViewAccessibility(SafeCategory) _didCompleteTransition:]
#5 0x002fe665 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:]
#6 0x002fe4f7 in -[UIViewAnimationState animationDidStop:finished:]
#7 0x00e426cb in run_animation_callbacks
#8 0x00e42589 in CA::timer_callback
#9 0x01206fe3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
#10 0x01208594 in __CFRunLoopDoTimer
#11 0x01164cc9 in __CFRunLoopRun
#12 0x01164240 in CFRunLoopRunSpecific
#13 0x01164161 in CFRunLoopRunInMode
#14 0x01b5a268 in GSEventRunModal
#15 0x01b5a32d in GSEventRun
#16 0x002dc42e in UIApplicationMain
#17 0x000021dc in main at main.m:14
该应用有什么问题?感谢
答案 0 :(得分:1)
由于这两个事件的时间安排正在讨价还价......你可以先做一件事就是先解除模型视图,之后使用计时器导航到下一个视图。 3秒......像这样...
[self.navigationController dismissModalViewControllerAnimated:YES];
[self performSelector:@selector(moveOn) withObject:nil afterDelay:3.5];
-(void)moveOn
{
SecondView *secondView = [[SecondView alloc] initWithNibName:@"" bundle:nil];
[self.navigationController pushViewController:secondView animated:YES];
[secondView release];
}