以下の内容はhttps://anton0825.hatenablog.com/entry/20120602/1339741730より取得しました。


[[UIDevice currentDevice] orientation]で取得したデバイスの向きがおかしい

多くのサイトでデバイスの向きを取得する方法は以下であると書いてある。

UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];

が、これを使うとデバイスの向きの判定が間違うことがあった。具体的には横向きの状態でUIDeviceOrientationIsPortrait(orientation)がYESになることがあった。
orientationの取得方法を以下のように変更すると直った。

UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];

原因がわからないままなので気持ち悪いが。。直ったのでよし。




以上の内容はhttps://anton0825.hatenablog.com/entry/20120602/1339741730より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14