【发布时间】:2011-07-13 19:38:30
【问题描述】:
可能重复:
crashing on ios device while navigation using UIModalTransitionStylePartialCurl in xcode 4
您好,我正在制作一个测试应用程序,中途运行时,我在切换页面代码中遇到了崩溃,这以前从未发生过,突然发生了。很奇怪吧?这是我的代码:
-(IBAction)fail {
Fail *fail = [[Fail alloc]
initWithNibName:@"Fail" bundle:nil];
fail.modalTransitionStyle = UIModalTransitionStylePartialCurl;
[self presentModalViewController:fail animated:YES];
}
这是我的控制台崩溃日志:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nested modal view controller while curled <QThree: 0x5537190>.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00f025a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x01056313 objc_exception_throw + 44
2 UIKit 0x000d2bac -[UIViewController presentModalViewController:withTransition:] + 741
3 Smart2 0x0000730a -[QThree fail] + 135
4 UIKit 0x0001f4fd -[UIApplication sendAction:to:from:forEvent:] + 119
5 UIKit 0x000af799 -[UIControl sendAction:to:forEvent:] + 67
6 UIKit 0x000b1c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
7 UIKit 0x000b07d8 -[UIControl touchesEnded:withEvent:] + 458
8 UIKit 0x00043ded -[UIWindow _sendTouchesForEvent:] + 567
9 UIKit 0x00024c37 -[UIApplication sendEvent:] + 447
10 UIKit 0x00029f2e _UIApplicationHandleEvent + 7576
11 GraphicsServices 0x0113b992 PurpleEventCallback + 1550
12 CoreFoundation 0x00ee3944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
13 CoreFoundation 0x00e43cf7 __CFRunLoopDoSource1 + 215
14 CoreFoundation 0x00e40f83 __CFRunLoopRun + 979
15 CoreFoundation 0x00e40840 CFRunLoopRunSpecific + 208
16 CoreFoundation 0x00e40761 CFRunLoopRunInMode + 97
17 GraphicsServices 0x0113a1c4 GSEventRunModal + 217
18 GraphicsServices 0x0113a289 GSEventRun + 115
19 UIKit 0x0002dc93 UIApplicationMain + 1160
20 Smart2 0x00003092 main + 83
21 Smart2 0x00002911 start + 53
)
terminate called after throwing an instance of 'NSException'
我不知道问题是什么,尤其是为什么它在一个构建中突然出现,我不记得我添加了哪个代码,因为实际上距离我上次构建已经有一段时间了。苏!
【问题讨论】:
-
如果您阅读您发布的控制台日志,它会准确地告诉您您做错了什么。
标签: objective-c ios xcode uiviewcontroller crash