Malte Onken
Malte Onken

Reputation: 769

iOS 5.0: MFMailComposeViewController Warning

Since I updated XCode for the new iOS 5.0 i get a warning in my MailComposer function.

 MFMailComposeViewController *pickerZap = [[MFMailComposeViewController alloc] init];
 pickerZap.mailComposeDelegate = self;
 // warning: Assigning to 'id<MFMailComposeViewControllerDelegate>' 
 // from incompatible type 'Infocontroller *'

What happend with the MFMailComposeViewControllerDelegate? What am i doing wrong?

Upvotes: 0

Views: 2239

Answers (1)

Stephen Darlington
Stephen Darlington

Reputation: 52565

We can't really answer questions about iOS 5 without breaking the NDA.

But what this looks like is that your class (Infocontroller) doesn't formally implement the delegate protocol (MFMailComposeViewControllerDelegate), i.e.,

@class Infocontroller : UIViewController<MFMailComposeViewControllerDelegate>

Just implementing the methods isn't enough.

Upvotes: 8

Related Questions