UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation]; switch (orientation) { case UIInterfaceOrientationPortrait: break; default: break; } 一見大丈夫そうなんですが、実はこれだとenum の値が0で返ってくることがあります。 手元で確認した限りでは、シミュレータとテーブルの上に水平においたデバイスの両方で再現しました。 つまり上の例だと、実際はPortraitとして認識してほしいのにdefaultの方に処理が流れちゃうことがあります。 おーこわ。 [[UIApplication sharedApplication] statusBarOrientation] を使おう UIInterfaceOrientati
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く