我在應用程序的電子郵件現在正在工作,但我得到一個編譯警告。我想解決這個問題,任何幫助或建議,將不勝感激。iPhone在應用程序郵件編譯警告
我收到此警告。
/Users/vikings1201/Documents/iPhone應用程序/ LittleTipper_4.0/tipApp/Classes/tipAppViewController.m:1083:0/Users/vikings1201/Documents/iPhone應用程序/ LittleTipper_4.0/tipApp/Classes/tipAppViewController.m :1083:警告:類「tipAppViewController」不落實「MFMailComposeViewControllerDelegate」協議
-(IBAction)sendMail {
MFMailComposeViewController *mailComposer = [[[MFMailComposeViewController alloc] init] autorelease] ;
mailComposer.mailComposeDelegate = self;
if ([MFMailComposeViewController canSendMail]) {
[mailComposer setToRecipients:nil];
[mailComposer setSubject:nil];
[mailComposer setMessageBody:@"Default text" isHTML:NO];
[self presentModalViewController:mailComposer animated:YES];
}
}
- (void)mailComposeController:(MFMailComposeViewController*)controller
didFinishWithResult:(MFMailComposeResult)result
error:(NSError*)error {
[controller dismissModalViewControllerAnimated:YES];
}
謝謝,這解決了它。 – Vikings