私は、tabbarcontrollerとnavigationcontrollerを持つiOS TabBarアプリケーションを持っています。 私の詳細ビューでは、私の最初のタブtableviewcontrollerからプッシュされています。私は電子メール共有でnavigationItem.rightBarButtonItemを共有しています。MFMailComposeViewController ModalViewがiOS5アプリケーションをクラッシュする
I持っている。このため、次のコード:
- (void)share
{
UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"Send" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Email",nil];
popupQuery.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
[popupQuery showInView:self.view];
[popupQuery release];
}
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
if ([MFMailComposeViewController canSendMail]){
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
[picker setMailComposeDelegate:self];
[picker setSubject:@"New theme"];
NSString *emailBody = @"Hi there";
[picker setMessageBody:emailBody isHTML:NO];
[self resignFirstResponder];
picker.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
picker.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentModalViewController:picker animated:NO];
[picker release];
}
else{
}
}
}
アプリは私の作曲の図を示しているが、私は、このビューで何かをやろうとしているとき(例えば、アドレスをピックアップしたり、何かを綴ります) - アプリはSIGTRAPでクラッシュします。
アプリがiOS5、iOS5.1でのみクラッシュします。 iOS4.2.1では、すべてが完璧に機能します。
問題が何ですか?何か案は?
例外ブレークポイントを設定したり、例外をトラップすると、メッセージとスタックトレースは何ですか? –
私のcrittercismダッシュボードに表示される内容:https:// docs。 google.com/document/d/1YTec1-gnrIhSUkvt66RcIouwtjgu6HgF2CTQcQ21pCw/editメインスレッドのxcodeに表示される内容は次のとおりです。https://docs.google.com/document/d/1AKLqTYYoTa8TcfRJ6-BEEHnafzT-w6NaV8frvPdoOB8/edit – oadash