Graham Bell
Graham Bell

Reputation: 1149

MFMessageComposeViewController not calling its delegate method

Hi i'm using MFMessageComposeViewController to send sms in my iOS project my code is like below,

 MFMessageComposeViewController *message = [[MFMessageComposeViewController alloc] init];
    message.delegate = self;
    message.recipients = [NSArray arrayWithObject:@"xxxxxx"];
    message.body = @"blha blah,,,,";
    [self presentModalViewController:message animated:YES];

and in my code i'm defining MFMessageComposeViewControllerDelegate method didFinishWithResult but when the task is completed control is not calling this didFinishWithResult delegate method.What may be the problem?

Any help is appreciated in advance.

Upvotes: 5

Views: 1387

Answers (1)

MCKapur
MCKapur

Reputation: 9157

You have to set the mailComposeDelegate

    message.messageComposeDelegate = self;

Upvotes: 21

Related Questions