我很容易找到一种将图片发布到 Twitter 的方法,并在下面发送电子邮件.. 但我仍然找不到 MMS 的解决方案,这里的所有搜索都说这是不可能的,但这些帖子已经有一年多了..如果有人知道请帮忙..
推文图片
-(IBAction)tweetpicture...{
TWTweetComposeViewController *twitter = [[TWTweetComposeViewController alloc] init];
[twitter setInitialText:@""];
[twitter addImage:tweetimage.image];
[self presentViewController:twitter animated:YES completion:nil];
[self dismissModalViewControllerAnimated:YES];
}
电子邮件图片
-(IBAction)mailpicture....{
MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init];
[mailComposer setMailComposeDelegate:self];
if ([MFMailComposeViewController canSendMail]) {
// [mailComposer setToRecipients:[NSArray arrayWithObjects:@"", nil]];
[mailComposer setSubject:@""];
[mailComposer setMessageBody:@"" isHTML:NO];
[mailComposer setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
UIImage *xcode = mailimage.image;
NSData *xcodeData = UIImagePNGRepresentation(xcode);
[mailComposer addAttachmentData:xcodeData mimeType:@"image/png" fileName:@""];
[self presentModalViewController:mailComposer animated:YES];
[mailComposer release];
} else {
[mailComposer release];
}
}
彩信图片
-(IBAction)sendviatext...{
//???
}
脸书图片
-(IBAction)sendtofacebook...{
???
}