0

I am using the following code for UIModalTransitionStyle view in my application when i click the button

 InfoViewController *infoViewController = [[InfoViewController alloc]initWithNibName:@"InfoViewController" bundle:nil];


infoViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self.presentedViewController presentViewController:infoViewController animated:YES completion:NULL];

its worked perfecly in ios5 but i update the application ios6 it not worked. How can I handle this issue

Ben10
  • 3,221
  • 2
  • 34
  • 61
  • 1
    Please give more exact details on what is occurring, in what way it is not working, anything showing in your debugger, etc. Otherwise nobody will be able to help you with your question. – Matt Mc Sep 26 '12 at 05:23
  • @MattMc its worked ios5 perfectly only in ios6 transition style not worked – Ben10 Sep 26 '12 at 05:39
  • 1
    Meaning what? The transition style isn't what you want it to be? It doesn't present at all? What is "self.presentedViewController"? What object is your code in? When are you calling this? These are things that I mean by "more exact details". – Matt Mc Sep 26 '12 at 05:52
  • @MattMc http://stackoverflow.com/questions/12563798/error-to-present-view-controller-centered-in-ipad-ios-6 same type of error – Ben10 Sep 26 '12 at 06:06

1 Answers1

1

This code works, tested in iOS 6.0 simulator.

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    self.moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:@"http://videoURL"]];
    self.moviePlayerController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

    [self presentViewController:self.moviePlayerController animated:YES completion:nil];

}

Since the URL is invalid, the MPMoviePlayerViewController will just endlessly flip back and forth, but the point is that it works.

Matt Mc
  • 8,882
  • 6
  • 53
  • 89