就播放视频而言,我想知道我能用iPad做些什么。我有以下UIButton操作的代码。
- (IBAction)playClick:(id)sender {
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"video3" ofType:@"m4v"];
NSURL *movieURL = [NSURL fileURLWithPath:moviePath];
MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
theMovie.scalingMode = MPMovieScalingModeAspectFill;
[theMovie play];
MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];
[self presentMoviePlayerViewControllerAnimated:moviePlayer];
}

如上所示,我得到了一个电影屏幕。我想知道是否有可能在电影屏幕的顶部(‘完成’上方)或底部(控制器下方)包含一个导航栏,以便在用户播放视频时添加一些操作?我猜this topic可能会关心我想做什么。
谢谢你的帮助。
发布于 2013-01-20 18:35:09
可以使用以下命令添加更多按钮:
UIBarButtonItem *button = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(yourButtonAction:)];
moviePlayer.navigationItem.rightBarButtonItem = button; 根据需要自定义这些按钮。
尝试这个有意义的.Hope。
问候
https://stackoverflow.com/questions/14422646
复制相似问题