ブログ
2012年10月11日(木)
iOS6 向き
(チベットと(たぶん)関係ありません)
iOS6 で、デバイスの向きに関連する「shouldAutorotateToInterfaceOrientation」が使えなくなったらしい。
iOS6 では、「supportedInterfaceOrientations」を使うらしい。
xcode 4.5 以降では「supportedInterfaceOrientations」を使えて、
これの返り値になる「UIInterfaceOrientationMaskPortrait」等が定義されている。
が、
xcode 4.5 よりも前ではその定義が無い。
で、その値:
02 UIInterfaceOrientationMaskPortrait
04 UIInterfaceOrientationMaskPortraitUpsideDown
08 UIInterfaceOrientationMaskLandscapeRight
16 UIInterfaceOrientationMaskLandscapeLeft
24 UIInterfaceOrientationMaskLandscape
26 UIInterfaceOrientationMaskAllButUpsideDown
30 UIInterfaceOrientationMaskAll
。
iOS6 で、デバイスの向きに関連する「shouldAutorotateToInterfaceOrientation」が使えなくなったらしい。
iOS6 では、「supportedInterfaceOrientations」を使うらしい。
xcode 4.5 以降では「supportedInterfaceOrientations」を使えて、
これの返り値になる「UIInterfaceOrientationMaskPortrait」等が定義されている。
が、
xcode 4.5 よりも前ではその定義が無い。
で、その値:
02 UIInterfaceOrientationMaskPortrait
04 UIInterfaceOrientationMaskPortraitUpsideDown
08 UIInterfaceOrientationMaskLandscapeRight
16 UIInterfaceOrientationMaskLandscapeLeft
24 UIInterfaceOrientationMaskLandscape
26 UIInterfaceOrientationMaskAllButUpsideDown
30 UIInterfaceOrientationMaskAll
。