我以编程方式向 MPMoviePlayerViewController 添加了一个导航栏。如何在导航栏中添加后退按钮项以导航到上一个视图控制器?
-(IBAction)playA1{
NSURL * urlA1 = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"A1"ofType:@"mp4"]];
MPMoviePlayerViewController *playercontrollerA1 = [[MPMoviePlayerViewController alloc] initWithContentURL:urlA1];
playercontrollerA1.moviePlayer.repeatMode = MPMovieRepeatModeOne;
// [self presentMoviePlayerViewControllerAnimated:playercontrollerA1]; //comment out if navigation bar code is added
playercontrollerA1.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
// ADD UI NAVIGATION BAR in EMBEDDED CONTROL STYLE
playercontrollerA1.moviePlayer.controlStyle = MPMovieControlStyleEmbedded;
UINavigationController *movieNavController = [[UINavigationController alloc] initWithRootViewController:playercontrollerA1];
playercontrollerA1.navigationItem.title=@"APone";
playercontrollerA1.navigationController.navigationBar.tintColor = [UIColor blackColor];
UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(favouriteButtonClicked:)];
playercontrollerA1.navigationItem.rightBarButtonItem = button;
[self presentViewController:movieNavController animated:YES completion:nil];
}