iOS8 Beta5+ Xcode6でUIAlertController(ActionSheet)を表示すると、ランタイム例外が発生します。
このバグはiPadデバイスでのみ発生しています。
UIAlertController を使用すると、以下の例外が発生します。
*キャッチされない例外 'NSGenericException' が原因でアプリを終了しています。
次のようにアクションシートを表示するためのマイコード
// Cancel Button
UIAlertAction *actionCancel = [UIAlertAction
actionWithTitle:NSLocalizedString(@"IDS_LABEL_CANCEL", nil)
style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
// cancel
//action handler
[self actionHandler:nil withTag:0 withButtonIndex:0];
}];
// print button
UIAlertAction *actionPrint = [UIAlertAction
actionWithTitle:NSLocalizedString(@"IDS_LABEL_PRINT", nil)
style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
//action handler
[self actionHandler:nil withTag:kAttachmentActionSheetTag withButtonIndex:0];
}];
// Create action sheet
UIAlertController *alertController = [UIAlertController
alertControllerWithTitle:nil message:nil
preferredStyle:UIAlertControllerStyleActionSheet];
[alertController addAction:actionCancel];
[alertController addAction:actionPrint];
// show aciton sheet
[self presentViewController:alertController animated:YES
completion:nil] ;