2011-03-19 59 views
2

你好,我在我的应用程序中有一个模式视图控制器,当按下某个按钮时,它将消失,并且带有UITableView的视图使用导航控制器滑入位置。该porblem是当我按下该按钮的模态视图控制器做disapear但不是导航到下一个视图应用程序崩溃,我得到了下面的堆栈:通过视图导航时崩溃

#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

请用编码整齐或全面地编辑您的问题。 – Tirth 2011-03-19 04:54:06

回答

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]; 

}