title: Flipping a Video Horizontally in Xcode
body: <p>I have a video such that when I play it in full view and flip the simulator horizontally the video would not flip. How can I make the video flip according to the iPhone's accelerometer?</p>
  
  <p>Here is the code for the video if it helps:</p>
  
  <pre><code>- (void)viewDidAppear:(BOOL)animated {
  
      NSBundle *bundle=[NSBundle mainBundle];
      NSString *moviePath = [bundle pathForResource:@"MainPageMovie" ofType:@"mp4"];
      NSURL *movieURL=[[NSURL fileURLWithPath:moviePath] retain];
      MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
      theMovie.scalingMode = MPMovieScalingModeAspectFill;
      theMovie.view.frame = CGRectMake(115.0, 156.0, 200.0, 150.0);
      [self.view addSubview:theMovie.view];
      [theMovie play];
  
      [super viewDidLoad];
      self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
  }
  </code></pre>