UIPopoverController iOS 8崩溃。

时间:2014-10-19 16:06:43

标签: xcode ios8 uipopovercontroller

我在我的应用程序中收到频繁的崩溃日志,它只发生在iOS8中。 我做了一些测试,但它似乎在模拟器中正常工作。

Thread : Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x38ccaf46 objc_msgSend + 5
1  UIKit                          0x2ea813e9 -[UIPresentationController runTransitionForCurrentState] + 444
2  UIKit                          0x2ea966bb -[UIViewController _presentViewController:presentationController:animationController:interactionController:completion:] + 822
3  UIKit                          0x2ea9764f -[UIViewController _presentViewController:withAnimationController:completion:] + 2850
4  UIKit                          0x2ea9915b __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 258
5  UIKit                          0x2e895d93 -[UIViewController presentViewController:animated:completion:] + 194
6  UIKit                          0x2ed82add -[UIPopoverController _presentShimmedPopoverFromRect:inView:permittedArrowDirections:animated:] + 188
7  UIKit                          0x2ed82c75 -[UIPopoverController presentPopoverFromRect:inView:permittedArrowDirections:animated:] + 276
8  AppName                        0x001f41db -[ViewController selectDate:] (ViewController.m:1019)
9  UIKit                          0x2e7e6d4b -[UIApplication sendAction:to:from:forEvent:] + 70
10 UIKit                          0x2e7e6cf1 -[UIControl sendAction:to:forEvent:] + 44
11 UIKit                          0x2e7d196b -[UIControl _sendActionsForEvents:withEvent:] + 582
12 UIKit                          0x2e7e675d -[UIControl touchesEnded:withEvent:] + 588
13 UIKit                          0x2e7e6437 -[UIWindow _sendTouchesForEvent:] + 522
14 UIKit                          0x2e7dfcf9 -[UIWindow sendEvent:] + 544
15 UIKit                          0x2e7b657d -[UIApplication sendEvent:] + 196
16 AppName                        0x0030df93 -[IdleTimeCheck sendEvent:] (IdleTimeCheck.m:23)
17 UIKit                          0x2ea29df9 _UIApplicationHandleEventFromQueueEvent + 13888
18 UIKit                          0x2e7b4fd1 _UIApplicationHandleEventQueue + 1296
19 CoreFoundation                 0x2b2de58f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
20 CoreFoundation                 0x2b2dd99f __CFRunLoopDoSources0 + 218
21 CoreFoundation                 0x2b2dc005 __CFRunLoopRun + 772
22 CoreFoundation                 0x2b22a621 CFRunLoopRunSpecific + 476
23 CoreFoundation                 0x2b22a433 CFRunLoopRunInMode + 106
24 GraphicsServices               0x325b00a9 GSEventRunModal + 136
25 UIKit                          0x2e815359 UIApplicationMain + 1440
26 AppName                        0x0008f9d5 main (main.m:22)

呈现它的代码有点像这样。

- (void) selectDate:(UIButton *)button
{
    SelectStartEndDate *selectStartEndDate = [[SelectStartEndDate alloc] initWithNibName:@"SelectStartEndDate" bundle:[NSBundle mainBundle]];
    selectStartEndDate.delegate = self;
    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:selectStartEndDate];

    selectDate = [[UIPopoverController alloc] initWithContentViewController:navController];

    selectDate.popoverContentSize = CGSizeMake(320, 208 + 44);              
    [selectDate presentPopoverFromRect:button.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
    selectDate.delegate = self;
}

谢谢!

0 个答案:

没有答案