Analyzing horizontal screen IF ([the UIApplication sharedApplication] == .statusBarOrientation UIDeviceOrientationLandscapeRight ||
[the UIApplication sharedApplication] == .statusBarOrientation UIDeviceOrientationLandscapeLeft) { // this landscape } the else { // this portrait }
Analyzing vertical screen IF ([the UIApplication sharedApplication] == .statusBarOrientation UIDeviceOrientationPortrait || [the UIApplication sharedApplication] .statusBarOrientation == UIDeviceOrientationPortraitUpsideDown) { // this portrait } the else { // this landscape }