[英]Rotation for UISplitView in ios6
我在我的應用程序中實現了SplitView
。
我的應用程序適用於ios 5和ios 6。
在ios 5中使用方法
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
旋轉工作正常。
但是在ios 6中,roataion方法不會調用。 我試過ios 6的方法;
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
我也搜索並嘗試了ios 6的其他旋轉方法,但它們沒有用。
我想支持ios 5和ios 6的旋轉。
我怎樣才能做到這一點?
謝謝。
請在AppDelegate中覆蓋此方法:
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ return UIInterfaceOrientationMaskAll;//Or Required by }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.