tags:

views:

49

answers:

1

I am using the following code:

- (void)flip
{
    MailComposerViewController *mailView = [[MailComposerViewController alloc] init]; 

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:2.0];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft 
                           forView:window
                             cache:YES];
    [mtController.view removeFromSuperview];
    //[self.window addSubview:[mailComposer view]];
    [self presentModalViewController:mailView animated:YES];
    [UIView commitAnimations];  
    [mailView release]
}

here mtController is a navigation controller (XIB file). I removed it and I add mailview, but the simulator does not show it. What am I doing wrong?

A: 

What are you trying to do? Less Vague Questions Is A Good Thing™. Are you trying to use a standard Mail compose controller and use it to flip over instead of present normally?

If so, you can do this:

MailComposerViewController *mailView = [[[MailComposerViewController alloc] init] autorelease];
mailView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:mailView animated:YES];
Nick Bedford
u have mistaken , MailComposerViewController is not a problem.i could not go to next view controller, presentModalViewController is not working in appdelegate.m
Mikhail Naimy
Your app delegate is not a UIViewController so of course it's not going to work. Why are you calling it yourself then? A navigation controller inherits from view controller though.
Nick Bedford