【发布时间】:2012-11-22 10:34:09
【问题描述】:
if ([MFMailComposeViewController canSendMail]) {
MFMailComposeViewController * mailComposeController=[[MFMailComposeViewController alloc]init];
mailComposeController.mailComposeDelegate = self;
// mailComposeController.wantsFullScreenLayout = NO;
[mailComposeController setSubject:@"WallPaperApp."];
[mailComposeController setMessageBody:@"This is my new Wallpaper." isHTML:NO];
UIImage *img=mainImageView.image;
UIImage *img1=[UIImage imageNamed:@"aaa.jpg"];
NSData *imageData = UIImagePNGRepresentation(img);
[mailComposeController addAttachmentData:imageData mimeType:@"image/jpg" fileName:[NSString stringWithFormat:@"photo.png"]];
[self presentModalViewController:mailComposeController animated:YES];
//[mailComposeController release];
}
它在 ios5 中运行良好,但在设备上的 ios6 m 测试中无法运行
【问题讨论】:
-
试试这个。 mailComposeController.wantsFullScreenLayout = YES;
-
img1 是干什么用的? (只是想理解它:D)
-
其实 img1 什么都不是,无用的 obj,如果有人知道,请帮忙,我卡在这里
-
在 ios6 中显示 mailComposer 的 viewController 是否旋转为横向?
-
我的应用程序只在横向,所以它不能在 ios6 中运行,但在 ios5 中运行良好
标签: iphone objective-c ios ios6