苹果提供了使用它使用的MFMailComposeViewController.but的代码
- (IBAction)buttonPressed
{
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc]init];
controller.mailComposeDelegate = self;
[controller setSubject:@"In app email..."];
[controller setMessageBody:@"...a tutorial from mobileorchard.com" isHTML:NO];
[self presentModalViewController:controller animated:YES];
[controller release];}默认情况下,它使用自下而上的transition.suppose,如果我想使用下面的内容,它会产生错误的输出。,我可以使用其他的添加子视图来代替presentModalViewController
{
UIViewAnimationTransition trans = UIViewAnimationTransitionFlipFromRight;
[UIView beginAnimations: nil context: nil];
[UIView setAnimationTransition:trans forView: [self view] cache: YES];
[self presentModalViewController: controller animated:YES];
[UIView commitAnimations];
}它对其他视图控制器是正确的,但是它在MFMailComposeViewController中没有工作--请给我任何帮助?
嗨,我已经这样做了,但是当前视图控制器翻转,然后composer来自底部.?您能帮忙吗?-(IBAction)clickedMailButton:(Id)发件人
{
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mcontroller = [[MFMailComposeViewController alloc]init];
//[mcontroller setSubject:@"My Pocket Schedule"];
[mcontroller setTitle:@"New Message"];
[mcontroller setMessageBody:@"Check out My Pocket Schedule in the iTune Store" isHTML:NO];
mcontroller.mailComposeDelegate = self;
UIViewAnimationTransition trans = UIViewAnimationTransitionFlipFromRight;
[UIView beginAnimations: nil context: nil];
[UIView setAnimationTransition:trans forView: [self view] cache: YES];
[self presentModalViewController:mcontroller animated:YES];
[UIView commitAnimations];
[mcontroller release];
}发布于 2009-11-04 12:16:27
使用modalTransitionStyle属性:
MFMailComposeViewController *mcontroller = [[MFMailComposeViewController alloc] init];
[mcontroller setTitle:@"..."];
[mcontroller setMessageBody:@"..." isHTML:NO];
mcontroller.mailComposeDelegate = self;
mcontroller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:mcontroller animated:YES];
[mcontroller release];发布于 2009-11-04 12:12:54
试一试
presentModalViewController:withTransition:
https://stackoverflow.com/questions/1673213
复制相似问题