내 코드에 "Parse Issue - Expected Statement"오류가 표시되며이를 수정하기 위해 무엇을 변경해야하는지 모릅니다.iOS 앱의 "Parse Issue - Expected Statement"
-(IBAction)email {
MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];
[composer setMailComposeDelegate:self];
if ([MFMailComposeViewController canSendMail]) {
[composer setToRecipients:[NSArray arrayWithObjects:@"[email protected]", nil]];
[composer setSubject:@"subject here"];
[composer setMessageBody:@"message here"isHTML:NO];
[composer setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
[self presentViewController:composer animated:YES completion:nil];
}
else {
}
}
-(void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
if (error) {
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"error"
message:[NSString stringWithFormat:@"error %@", [error description]]
delegate:nil cancelButtonTitle:@"dismiss" otherButtonTitles:nil, nil];
[alert show];
[self dismissViewControllerAnimated:YES completion:nil];
}
else {
[self dismissViewControllerAnimated:YES completion:nil];
}
}
올바른 들여 쓰기를 사용하면 더 명확합니다. ;-) 이메일 메서드에서'else'를 제거하십시오. –