当我查看控制台时,我收到此消息
2010-09-18 17:04:05.284 浪费时间[8998:207] *** -[UIActionSheet showInView:] 中的断言失败,/SourceCache/UIKit_Sim/UIKit-1145.66/UIAlert.m:7073
2010-09-18 17:04:05.286 浪费时间 [8998:207] *** 由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“无效参数不满足:视图!= nil”
2010-09-18 17:04:05.286 浪费时间[8998:207] 堆栈:(
42272848,
43430700,
42010379,
811796,
3796273,
3862560,
9631,
3616645,
3688229,
3682846,
3690662,
3686119,
4983946,
71264534,
71263781,
71207378,
71206706,
3003734,
3030334,
3011831,
3043800,
51265916,
41552028,
41547944,
3002913,
3036018,
8314
)
在抛出“NSException”实例后调用终止
代码如下:
- (void)viewDidLoad {
BOOL continueYesNo;
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
continueYesNo = [prefs boolForKey:@"keyContinueMeeting"];
if (continueYesNo) {
NSString *message_continue = [[NSString alloc] initWithFormat:@"Do you want to Continue the Prior Meeting"];
UIActionSheet *actionSheet = [[UIActionSheet alloc]
initWithTitle:message_continue
delegate:self
cancelButtonTitle:@"Reset"
destructiveButtonTitle:@"Continue"
otherButtonTitles:nil];
[actionSheet showInView:self.view];
[actionSheet release];
[message_continue release];
}
}
它在 iPhone 和 iPhone 模拟器中运行良好,但在 iPad 模拟器中崩溃。