2014-10-27 363 views
1

我知道iOS 8有很多更新。我在我的iOS 7和以下版本的應用程序中修復了這個問題,以便在需要使用`[UIViewController attemptRotationToDeviceOrientation]方法強制旋轉我的應用程序方向。但不幸的是,它不適用於iOS 8(它未進一步調用shouldAutorotate方法)。任何人請爲這個問題建議備用解決方案或更好的iOS 8修復。attemptRotationToDeviceOrientation方法不工作在iOS 8

+0

有任何解決方案? – 2014-12-18 06:30:44

+1

就我而言,我已經在基礎viewcontorller上模態地呈現了一個屏幕。關閉時,我在我的基本viewcontroller上使用了「attemptRotationToDeviceOrientation」,但它在ios 8上不起作用。因此,我沒有以模態方式呈現,而是使用自定義模態動畫對viewcontroller進行了子視圖。這是我在我的情況下如何修復...... @Arun_k – Srinivas 2014-12-18 06:38:21

回答

0

enter image description here

如果你正在嘗試的viewController旋轉到設置的方位,attemptRotationToDeviceOrientation不起作用。不知道爲什麼,但那是我到目前爲止的想法。