1
IOS 응용 프로그램에 IOS를 실행하는 버튼이 있습니다. 6,7 IOS 8을 실행하는 장치에서 이 제대로 작동하지만 IOS 8을 실행하는 장치에서 전자 메일이 열리거나 응용 프로그램이나 로그에 오류가 나타나지 않지만 이메일을받지 못했습니다IOS 8 : 전자 메일을 보내지 않았습니다.
나는 애플 리케이션 사이트뿐만 아니라 다른 튜토리얼에서 보았을뿐만 아니라 그것을 검색하고 있었는데 나는 내가 쓴 것과 어떤 차이도 보이지 않는다 ... 어떤 아이디어?
- (IBAction) emailBtn_Click:(id)sender
{
MFMailComposeViewController *emailComposer = [[MFMailComposeViewController alloc] init];
emailComposer.mailComposeDelegate = self;
if ([MFMailComposeViewController canSendMail] == YES)
{
[emailComposer setSubject:@"hi"];
[emailComposer setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
[self presentViewController:emailComposer animated:YES completion:NULL];
}
else
{
NSLog(@"Can't Open Email");
}
}
- (void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
{
switch (result)
{
case MFMailComposeResultCancelled:
NSLog(@"e-mail cancelled");
break;
case MFMailComposeResultSaved:
NSLog(@"e-mail saved");
break;
case MFMailComposeResultSent:
NSLog(@"e-mail sent");
break;
case MFMailComposeResultFailed:
NSLog(@"e-mail sent failure: %@", [error localizedDescription]);
break;
default:
break;
}
[self dismissViewControllerAnimated:YES completion:NULL];
}