尝试显示 ActionSheet 时收到以下错误...
2012-11-16 04:07:03.878 MKS WebTech[814:c07] -[mksWorkOrderViewController _presentActionSheet:asPopoverFromBarButtonItem:orFromRect:inView:withPreferredArrowDirections:passthroughViews:backgroundStyle:animated:]: 无法识别的选择器发送到实例 0x75a5950
- (IBAction)ActionClick:(id)sender {
popupSheet = [[UIActionSheet alloc] init];
[popupSheet setDelegate:self];
[popupSheet addButtonWithTitle:@"Contact List"];
[popupSheet addButtonWithTitle:@"Zone Descriptions"];
[popupSheet addButtonWithTitle:@"Zone Testing"];
[popupSheet addButtonWithTitle:@"Panels"];
[popupSheet addButtonWithTitle:@"Time Sheet"];
[popupSheet addButtonWithTitle:@"Inventory"];
[popupSheet addButtonWithTitle:@"Other Appt."];
[popupSheet addButtonWithTitle:@"Alarm History"];
[popupSheet addButtonWithTitle:@"Service History"];
[popupSheet addButtonWithTitle:@"Complete"];
[popupSheet addButtonWithTitle:@"Cancel"];
[popupSheet setCancelButtonIndex:10];
// Prepare your action sheet
[popupSheet showFromBarButtonItem:bntAction animated:NO];
[popupSheet release];
}
错误发生“showFromBarButtonItem:bntAction”我也尝试使用发件人但结果相同
canPerformAction 也可以毫无问题地触发...
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender {
return YES;
}