ipad&iphoneのデバイスの向きの対応
以下のソースを参考にするとできます。
UIDeviceOrientation orientation = [[notification object] orientation];
if (orientation == UIDeviceOrientationLandscapeLeft) {
...
} else if (orientation == UIDeviceOrientationLandscapeRight) {
...
} else if (orientation == UIDeviceOrientationPortraitUpsideDown) {
...
} else if (orientation == UIDeviceOrientationPortrait) {
...
}
姉妹サイトだよ! よかったらみてね!
UIDeviceOrientation orientation = [[notification object] orientation];
if (orientation == UIDeviceOrientationLandscapeLeft) {
...
} else if (orientation == UIDeviceOrientationLandscapeRight) {
...
} else if (orientation == UIDeviceOrientationPortraitUpsideDown) {
...
} else if (orientation == UIDeviceOrientationPortrait) {
...
}
スポンサーサイト