0
HI我有一个UITableview,当用户点击一个特定的单元格时,我使用MPmovieplayercontroller播放视频,视图正确播放,顶部有一个完成按钮。当我点击完成按钮时,我需要回到主视图控制器,wchih具有UIble视图。请参阅下面的代码,并告诉我可以做些什么。来自UITableview的MPMoviePlayerController
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
NSString *surl = [videoSelected valueForKey:@"video_path"];
NSLog(@"Video :%@",surl);
NSURL *url = [NSURL URLWithString:@"http://localhost/MyWorks/files/videos/hit.mp4"];
MPMoviePlayerController *player =[[MPMoviePlayerController alloc] initWithContentURL: url];
[[player view] setFrame: [self.view bounds]]; // frame must match parent view
[self.view addSubview: [player view]];
[player play];
[msg release];
}
它说“对象MPMovieplayercontroller无法找到属性navigationItem” – UnlimitedMeals
尝试'player.navigationController.navigationItem' –
nope这不起作用。 – UnlimitedMeals