Tag: orientation

status bar becomes gradient after closing video in landscape mode

Below is happening with iOS 6. I am playing video which can be played in potrait or landscape mode. Once video’s Done button is pressed I am making screen to potrait mode programmatically. The problem is when I open app, I have black status bar. When I play video as potrait only, I still see […]

Error in iOS 6 after adding GameCenter to a landscape-only cocos2d app

I’m having the issue described here: https://devforums.apple.com/thread/165384?tstart=0 Where my app crashes trying to load the GameCenter login screen because the screen is in portrait and my app only supports landscape. I’ve tried every solution described in the above thread, as well as all the solutions on the following thread: Crash on presenting UIImagePickerController under iOS […]

iPad Orientation Checking UIView Class?

I have a UIView class which I add to my main UIViewController and I need to check the orientation of the device (iPad) at the launch of the app, in the viewDidLoad method. However because the class is a UIView (not UIViewController) I can’t use methods such as willAnimateRotationToInterfaceOrientation. So I attempted to use this […]

how can i set landscape orientation when playing a video from webview

i have a webview with a video link, the app is only portrait orientation but i need to change orientation when the video is in fullscreen and use all screen. Thanks for your help.

supportedInterfaceOrientations not called with iOS 7

I searched for an answer to this, but couldn’t find anything which solved my problem. So here’s the problem: I have a custom UINavigationController, when creating it the supportedInterfaceOrientations method is called on the rootViewController(only supports portrait). But when pushing an other ViewController onto the stack this method isn’t called on the pushed ViewController(supports all […]

iOS 8 – Rotation makes statusBar disappear even in portrait mode after toggling controls

I’m having a lot of troubles with the new auto hiding of the status bar in iOS 8. In my app, I’ve got a view in which when the user taps once, the navigation bar and the status bar disappear. When in landscape, the status bar hides by itself and it’s fine to me. I […]

Why does capturing images with AVFoundation give me 480×640 images when the preset is 640×480?

I have some pretty basic code to capture a still image using AVFoundation. AVCaptureDeviceInput *newVideoInput = [[AVCaptureDeviceInput alloc] initWithDevice:[self backFacingCamera] error:nil]; AVCaptureStillImageOutput *newStillImageOutput = [[AVCaptureStillImageOutput alloc] init]; NSDictionary *outputSettings = [[NSDictionary alloc] initWithObjectsAndKeys: AVVideoCodecJPEG, AVVideoCodecKey, nil]; [newStillImageOutput setOutputSettings:outputSettings]; [outputSettings release]; AVCaptureSession *newCaptureSession = [[AVCaptureSession alloc] init]; [newCaptureSession beginConfiguration]; newCaptureSession.sessionPreset = AVCaptureSessionPreset640x480; [newCaptureSession commitConfiguration]; if ([newCaptureSession […]

iPad frame width and height mixup in landscape

I have done what this question said here: Landscape Mode ONLY for iPhone or iPad but the view.frame.size.height is still 1024, which is the height when the device is in portrait, surely when the interface rotates the width and height switch values? (say you wanted to split the screen into 3 views, for an app […]

iphone: Forcefully change orientation from portrait to landscape on navigation

Is there any way that we can Forcefully change app orientation from portrait to landscape while navigating ? I have a requirement that while pushing controller from A to B. B should be in landscape but my A controller is in portrait.

iOS 8 Orientation Change Detection

Running on iOS 8, I need to change the UI when rotating my app. Currently I am using this code: -(BOOL)shouldAutorotate { UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; if (orientation != UIInterfaceOrientationUnknown) [self resetTabBar]; return YES; } What I do it remove the current UI and add a new UI appropriate to the orientation. However, […]