Reputation: 271
Hello I have in my app a modal view controller which when a certain button is pressed disappears and a view with a UITableView in it slides into position using a navigation controller. The porblem is when I press that button the modal view controller does disapear but instead of navigating to the next view the app crashes and I get the following stack:
#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
What is wrong with the app? Thanks
Upvotes: 2
Views: 385
Reputation: 86
it is happing due to the timing of both events... you can do one thing first dismiss the model view and after that using timer navigate to next view after approx. 3 seconds... like this...
[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];
}
Upvotes: 1