Is there a way to disable the fullscreen button of the MPMoviePlayerController ?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
If the only thing you want to do is disable pinch to go full screen (i.e. keep interaction enabled and whatever control style you want), you can use this:
Depending on your needs, you can also simply disable all user interactions on the player view.
You can set controlStyle to Fullscreen. these controls are somewhat different, but it doesn't feature a Fullscreen button!
I know, it's a little outdated, but anyway. I did some research in that direction, and looks like a found an answer. I do not know, why it's working, but it is.
// When the movie is done, release the controller.
There's a cheat:
The main catch is, you have to do it in
viewDidAppear:
or similar, because the MoviePlayer view sets itself up somewhere insidedidMoveToWindow
ordidMoveToSuperview
, which happen afterviewWillAppear:
. So you get a brief flash of the fullscreen button. Other obvious catches include: brittle vs. Apple changing that 512 tag value (although it works in 3.2 - 4.2); and of course Apple would rather you not do this.The endorsed solution is to set the control style to
MPMovieControlStyleNone
and roll your own transport controls, which is more work.Simple block to remove pinch zoom here
Hope it help
it work with me on iOS6