프로그래밍 방식으로 MPMoviePlayerViewController에 탐색 모음을 추가했습니다. 이전보기 컨트롤러로 이동하기 위해 탐색 모음에 백바 단추 항목을 추가하는 방법 이 같은 잘못된 방법을 UINavigationController가 사용하고MPMmoviPlayerView 컨트롤러의 탐색 모음에있는 백 바 버튼 항목
-(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];
[email protected]"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];
}
감사합니다. Ricardo. 나를 위해 속임수를했다. – Sivon
당신은 Sivon을 환영합니다. –