我全屏显示一个短片,最后我不想忽略MPMoviePlayerController
,这是默认行为,但是要简单地显示控件并允许用户点按& #34;完成"当他们准备继续前进时。
到目前为止,我设法在这个答案的帮助下禁用了自动关闭:https://stackoverflow.com/a/19596598/362657现在我只需要显示控件。
我有以下内容:
-(void)videoFinished:(NSNotification*)aNotification{
int value = [[aNotification.userInfo valueForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue];
if (value == MPMovieFinishReasonUserExited) { // user tapped Done
[self dismissMoviePlayerViewControllerAnimated];
} else { // movie finished playing
MPMoviePlayerController *player = aNotification.object;
// do something to show the controls, but what?
}
}
我尝试将controlStyle
设置为无,然后再设置为全屏,但在用户点按屏幕之前仍然没有效果。有没有办法以编程方式触发电影控件的显示?