由于UIPopoverController,未知的应用程序崩溃了

时间:2013-12-02 12:40:59

标签: objective-c crash uipopovercontroller

0   CoreFoundation                  0x2e11ef4e __exceptionPreprocess + 126
1   libobjc.A.dylib                 0x3892d6aa objc_exception_throw + 34
2   CoreFoundation                  0x2e11ee90 +[NSException raise:format:] + 100
3   UIKit                           0x30da0cae -[UIPopoverController _commonPresentPopoverFromRect:inView:permittedArrowDirections:animated:] + 494
4   UIKit                           0x30da1ef0 -[UIPopoverController presentPopoverFromRect:inView:permittedArrowDirections:animated:] + 48
5   TestApp                         0x0018a236 -[TestAppController showCheckInOutPopoverWithStatus:] (TestAppController.m:7591)
6   TestApp                         0x0016ae80 -[TestAppController tableView:didSelectRowAtIndexPath:] (TestAppController.m:5499)
7   UIKit                           0x309ad326 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1074
8   UIKit                           0x30a6024e -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 210
9   UIKit                           0x3091096c _applyBlockToCFArrayCopiedToStack + 312
10  UIKit                           0x3088846e _afterCACommitHandler + 426
11  CoreFoundation                  0x2e0ea1d0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 16
12  CoreFoundation                  0x2e0e7b74 __CFRunLoopDoObservers + 280
13  CoreFoundation                  0x2e0e7eb6 __CFRunLoopRun + 726
14  CoreFoundation                  0x2e052ce2 CFRunLoopRunSpecific + 518
15  CoreFoundation                  0x2e052ac6 CFRunLoopRunInMode + 102
16  GraphicsServices                0x32d4d27e GSEventRunModal + 134
17  UIKit                           0x308f4a3c UIApplicationMain + 1132


uiCustomPopover = [[UIPopoverController alloc]  initWithContentViewController:self.TestAppDisplayPopoverViewController];
[uiCustomPopover setPopoverContentSize:CGSizeMake(354.5, 229.5)];
uiCustomPopover.delegate=self;
[uiCustomPopover presentPopoverFromRect:CGRectMake(250,15.0, 1.0, 1.0) inView:someView permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];

以上是我的应用的崩溃日志,我不知道,可能是导致崩溃的原因是什么?是因为UIPopoverController还是因为PresentPopoverFromRect。非常感谢任何形式的帮助。

提前致谢:)

代码已添加......

1 个答案:

答案 0 :(得分:0)

尝试制作

@property (strong, nonatomic) UIPopoverController *uiCustomPopover;

然后:

self.uiCustomPopover = [[UIPopoverController alloc]  initWithContentViewController:self.TestAppDisplayPopoverViewController];
[self.uiCustomPopover setPopoverContentSize:CGSizeMake(354.5, 229.5)];
self.uiCustomPopover.delegate=self;
[self.uiCustomPopover presentPopoverFromRect:CGRectMake(250,15.0, 1.0, 1.0) inView:someView permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];

那应该有所帮助。我也有同样的问题,比如UIPopoverController在呈现之前已经解除分配或者什么......