0
我禁用了橫向模式,下面的代碼在我的應用程序中。 :在mailViewController中禁用橫向模式
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
但是,當郵件視圖顯示它以某種方式顯示,使陸地景觀模式。
代碼的郵件操作的:
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
[mailer setSubject:@"Subject 1"];
UIImage *myImage = [UIImage imageNamed:@"logo_v22.png"];
NSData *imageData = UIImagePNGRepresentation(myImage);
[mailer addAttachmentData:imageData mimeType:@"image/png" fileName:@"mobiletutsImage"];
NSString *emailBody = @"Test ";
[mailer setMessageBody:emailBody isHTML:NO];
[self presentModalViewController:mailer animated:YES];
}
主要問題:如何禁用風景模式中mailView?
其它問題:如何更改按鈕的顏色mailView? (取消按鈕和發送按鈕)
我使用的IOS 5.1 – ignotusverum
我已經編輯我的答案爲您提供更正確的解決方案。希望有所幫助 – Madivad