How to access and open the iPhone's SMS API from an iPhone app

前端 未结 2 486
孤独总比滥情好
孤独总比滥情好 2020-12-20 00:56

In my iPhone app, I need to access the SMS application.

I need that when I click a button in my iphone app. It should open the SMS app of iphone and preload the mess

相关标签:
2条回答
  • 2020-12-20 01:29

    Try this :

    MFMessageComposeViewController *pickerSMS = [[MFMessageComposeViewController alloc] init];
    pickerSMS.messageComposeDelegate = self;
    
    pickerSMS.body = @"hello!";
    
    [self presentModalViewController:pickerSMS animated:YES];
    [pickerSMS release];
    
    0 讨论(0)
  • 2020-12-20 01:47

    This is possible starting from iOS 4.0; use the MFMessageComposeViewController from the MessageUI Framework.

    Details and example: http://developer.apple.com/library/ios/#samplecode/MessageComposer/Introduction/Intro.html

    0 讨论(0)
提交回复
热议问题