浏览视图时发生崩溃

发布于 2024-10-24 05:40:24 字数 1041 浏览 5 评论 0原文

您好,我的应用程序中有一个模态视图控制器,当按下某个按钮时,该控制器会消失,并且其中带有 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

应用程序出了什么问题?谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

可爱暴击 2024-10-31 05:40:25

这是由于两个事件的时间安排而发生的...您可以做一件事,首先关闭模型视图,然后使用计时器在大约 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];

}

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

}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文