Tag: orientation

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, […]

UIDevice currentDevice's “orientation” always null

As per the title. Calling [[UIDevice currentDevice] BeginGeneratingDeviceOrientationNotifications] has no effect. DidRotateToInterfaceOrientation etc events are working fine, but I need to be able to poll the device orientation arbitrarily. How can I fix/do this? The long story: I have a tab application with a navigation controller on each tab. The root view of tab number […]

Handling Rotation in iOS6

I only want to support different Orientations on one View in my UINavigationController Stack. How can I do this? It also has to work in iOS5.

uiwebview not resizing after changing orientation to landscape

I’m coding an iPhone app in which I have a UIWebView that loads a website with a responsive design. The problem I have is when I rotate the devices to landscape: the UIWebView rotates but it keeps the same width as the portrait mode. I spent the last 5 hours searching all over the net, […]

How to properly design multi-orientation iPad application

What’s the correct way of designing multi-orientation iPad app nowadays? I’ve read a lot of Apple docs, web resources and some SO Q&A. Here are my initial requirements: This has to work on iOS 5 and above. No need to create back compatibility with previos versions of iOS. I would like if possible to have […]

Save UIImage, Load it in Wrong Orientation

I am using the following code to save and load images that I pick from either the library or take using the camera: //saving an image – (void)saveImage:(UIImage*)image:(NSString*)imageName { NSData *imageData = UIImagePNGRepresentation(image); //convert image into .png format. NSFileManager *fileManager = [NSFileManager defaultManager];//create instance of NSFileManager NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); //create an array […]

Force UIViewController to only show in landscape mode

My app runs in portrait mode, but i want to show one screen in landscape mode only as it is a chart. What do i add to my uiviewcontroller to force it into landscape mode only?

Force portrait orientation while pushing from landscape View Controller

App Support: iOS6+ My app works in both portrait and landscape. But 1 controller should only works in a Portrait. The problem is that when I am in landscape and push the view controller the new viewcontroller is in landscape as well until I rotate it to portrait. Then it’s stuck in portrait as it […]

UIWebView dones't resize correctly when orientation change?

I have add a webview,a titleLabel and a coverflowView on a viewcontroller’s view as its subviews, I want it to change size when the orientation change. I have change the webview’s frame in this method: – (void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration its content did resize when rotate iPad from orientationLandscape to orientationPortrait or from orientationPortrait to […]