lab*_*b12 4 iphone landscape objective-c rotation mpmovieplayercontroller
我试图将我的MPMoviePlayerController旋转到横向视图,但它始终保持纵向模式.我在UIViewController中这样做,当我处于全屏模式时,我仍然无法旋转我的MPMoviePlayerController.我是否必须对shouldAutorotatetoOrientation方法做些什么?如果有人知道怎么做,请回复!
谢谢,
凯文
默认情况下,UIViewController类仅以纵向模式显示视图.要支持其他方向,必须覆盖shouldAutorotateToInterfaceOrientation:方法,并为子类支持的任何方向返回YES.如果正确配置了视图的自动调整属性,则可能只需要执行此操作.但是,UIViewController类为您提供了额外的钩子,以根据需要实现其他行为.
例如,如果您autoresizingMask设置为UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight,并且电影播放器视图的父视图具有autoresizesSubviews = YES,则shouldAutorotateToInterfaceOrientation可能只需要从中返回YES 即可.
| 归档时间: |
|
| 查看次数: |
6953 次 |
| 最近记录: |