簡體   English   中英

iPhone橫向模式問題

[英]iPhone landscape orientation mode issues

我將我的 info.plist 設置如下:

  • 初始界面方向:橫向(左主頁按鈕)
  • 支持的界面方向:橫向(左主頁按鈕)和橫向(右主頁按鈕)

當我啟動我的應用程序時,方向設備具有橫向模式,但我的視圖不會旋轉到該方向。

我使用下面的方法旋轉方向,但在橫向模式下查看不是初始的(在這種情況下我旋轉我的設備后我需要結果 - 在橫向模式下查看旋轉)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}

過去我遇到過幾個問題。 基本上,如果您只是將初始視圖 controller 放在那里,它就會像在縱向模式下一樣處理錯誤。 我找到的修復方法是將視圖 controller 添加到導航 controller。

請參閱我發布的這個問題以獲得完整解釋

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM