I want to send a picture via an iphone开发者_如何学运维 app.
Since it's not possible to send MMS, I found some answers speaking about sending the picture as an attachment with the SMS. How to do that programmatically?
Here is the code:
    MFMessageComposeViewController *sms = [[MFMessageComposeViewController alloc]init];
    [sms setMessageComposeDelegate:self];
    [sms setRecipients:[NSArray arrayWithObject:@"123-4567"]];
    [sms setSubject:@"Subject"];
    [sms setBody:@"Body"];
    [sms addAttachmentData:myData typeIdentifier:@"type" filename:myFile];
    [sms setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
    [self presentViewController:sms animated:YES completion:NO];
Hope it helps.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论