Add Custom Controls to MoviePlayer

后端 未结 5 453
慢半拍i
慢半拍i 2020-12-07 23:28

I am trying to figure out how to add a custom control to the iPhone MoviePlayer. For an example of what I am trying to do see the following image.

5条回答
  •  Happy的楠姐
    2020-12-08 00:15

    I found the BEST way to do this!

    You create your movie player like normal and then do the following:

    id vvController = [theMovie videoViewController];
    [[vvController _overlayView] addSubview:mainView];
    

    Where 'mainView' is your custom overlay. Doing this makes it so your custom overlay will show and hide with the normal overlays as they are now one in the same!

    Please note that this is still using the standard frameworks, but it is undocumented in the frameworks. So it should be 100% appstore safe, but "could" change without notice from Apple in later frameworks.

提交回复
热议问题