//Import the MessageUI Framework into your project and  
//#import the header file into the “.h” file of your controller  
//where you want to open the In-App SMS sheet. 
-(IBAction) sendInAppSMS:(id) sender 
{ 
    MFMessageComposeViewController *controller = 
        [[[MFMessageComposeViewController alloc] init] autorelease]; 
    if([MFMessageComposeViewController canSendText]) 
    { 
        controller.body = @"Hello from Mugunth"; 
        controller.recipients = [NSArray arrayWithObjects: 
                @"12345678", @"87654321", nil]; 
        controller.messageComposeDelegate = self; 
        [self presentModalViewController:controller animated:YES]; 
    } 
}

发布评论

分享到:

IT虾米网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!

iOS从远程地址获取图片并修改尺寸详解
你是第一个吃螃蟹的人
发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。