我正在编写以编程方式发送短信的代码 程序在倒数第二行崩溃。
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
picker.messageComposeDelegate = self;
picker.recipients = [NSArray arrayWithObject:@"123456789"]; // your recipient number or self for testing
picker.body = @"test from OS4";
[self presentModalViewController:picker animated:YES];
[picker release];
答案 0 :(得分:0)
我认为它可以安全地说它实现了
UIViewController <MFMessageComposeViewControllerDelegate>
在这种情况下,我建议返回http://iphonesdkdev.blogspot.com/2010/04/mfmessagecomposeviewcontroller-sample.html,复制他们的示例并从那里继续进行。