[英]Landscape Orientation not working when Storyboard iOS 5.1
我有一個使用情節提要板創建的應用程序,我只想支持橫向模式,並且執行了以下操作:
然而,在模擬器上,iPad將處於橫向模式,而視圖將處於縱向模式,與iPad BUT相同,僅適用於iOS <6的設備
為什么會這樣呢? 我在這里想念什么?
只需將此代碼復制到您的應用程序委托中
-(BOOL)shouldAutorotate
{
return YES;
}
-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
//just write yout desired orientations here
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown ;
}
在info.plist中的“支持的界面方向(iPad)”下...將橫向方向移動到列表頂部。 您的問題將得到解決。 為我工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.