日々精進

新しく学んだことを書き留めていきます

2013-01-27から1日間の記事一覧

画面の向きを取得する

iOS

以下のコードで画面の向きを取得するとorientationがUIDeviceOrientationUnknownになってしまう。 UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation]; ↓を使えばいいらしい。なんか紛らわしいなぁ。 UIInterfaceOrientation ori…