Stop status bar from rotating when switching views on orientation - ios

I have 2 views. A portrait detail view that when rotated to landscape, does a manual segue to a full screen photo viewer. The portrait detail view returns NO for shouldAutorotate and prefersStatusBarHidden.
When I rotate from portrait to landscape, just before the landscape view fades in, I can see the portrait view resize slightly as the status bar gets hidden and then the status bar moves from the top to the side.
The transition looks a bit ugly. I'd rather the status bar remains visible as the device is rotated to portrait, since it will get covered over by the landscape view anyway. Is it possible to do this?

I don't think this is possible.
The only way I see it working is if you do the rotation yourself and not with the device ability

Related

Present one view in landscape mode in an otherwise portrait mode app

I have an application (iPhone only) that is portrait-only, but with one exception, a view that must be displayed in landscape mode.
I have implemented the technique described in the accepted answer in How to lock orientation of one view controller to portrait mode only in Swift, albeit in Objective-C.
Since I've overridden the -lockOrientation methods in -viewWillAppear and -viewWillDisappear of the landscape view controller, I don't undertand why I see rotation occur after the view appears; I would have thought that would occur before the view appears.
When my presented landscape view is overlaid by a presented portrait view, the portrait view starts out as landscape (because it's presented over a landscape view before rotation), but the rotated view has only the height it had in landscape mode.
When the portrait view is dismissed, the first, landscape view has now rotated to portrait mode, even though I've also implemented -supportedInterfaceOrientations and -preferredInterfaceOrientationForPresentation for landscape mode. This has been noted in UIViewController orientations, but there didn't appear to be any working solutions posted there.
Both view controllers, the landscape and the portrait that overlays it, are presented rather than pushed.
Also, the only flag set in the project's Info.plist is Portrait. The full-screen flag is not set.
In short, it's a hot mess just trying to make one exception to view orientation in my app.
Any clues to solving the behavior I've described would be greatly appreciated.

landscape and portrait in split viewController

I created a split view controller application. I want to display my buttons and controls in landscape and portrait view differently(only the position).
When I change the orientation to landscape it shows the controls in portrait only. When I click on the cell in the tableview then it will show in correct position. What is the reason for that? Help me please.
I am a little confused about your question, but what I think you are trying to ask is how to change your view if the screen is in landscape or portrait orientation. Without seeing your code it is hard to tell you exactly how to do it, but the general idea (at least how I do it in my code) is that you want to split your code into two parts one that is in landscape orientation, and one that is in portrait orientation. You can tell the difference by seeing if the screen height is greater than the screen width.

iPad uitableview off position when rotate landscape and portrait

I am developing an iPad GUI with 2 uitableview top and bottom, both occupying half the screen with a navigational controller. when i rotate the view, the table does up and hide behind the navigational controller. when launch it doesn't. it only happens when it rotates. Image 1 shows the table when launch. image 2 shows the columns missing when rotating to landscape. image 3 shows the column missing when shifted back to portrait. is it possible to code a fix position on the screen when portrait and landscape? meaning i set the position when detecting the iPad is in portrait, and landscape.
Override willAnimateRotationToInterfaceOrientation:duration: method in your main view controller, and resize your UITableViews by setting their frames.
See also:
http://developer.apple.com/library/ios/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/instp/UIView/frame
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instm/UIViewController/willRotateToInterfaceOrientation:duration:

How can I stop the UIViewController auto-rotation animation from clipping my view?

In my iOS app I have a view controller in a UINavigationController. The navigation controller's nav bar and toolbar are both showing.
The view controller just has a simple background image as the view. The view controller can be rotated to any orientation. When the willAnimateRotationToInterfaceOrientation:duration: method is called, the view controller applies a transform to the view so that it appears to remain in the exact same position it was originally, with the same orientation. The toolbar and the nav bar, however, rotate to the new orientation.
So far so good. On rotations, the nav bar and toolbars rotate, the view appears to remain in the same position. The only problem is that during the rotation, the corners of the view are clipped off. It looks like the view controller is clipping the contents of the screen to a rectangle that animates from the original screen orientation to the new screen orientation.
Is there any way to stop it from clipping like that?
Try making your background image the size of the screen. So if its an iPhone make it 480 x 480.

Same View for landscape and Portrait in Splitview

I want same view in portrait and landscape in splitview in iPad Application. In portrait I get rootviewcontroller as popOver. I don't want that. It should be same as it is displayed in landscape mode. Is it possible?
Well, I'm afraid that the term same is a bit confusing here. There is no problem for you to develop a similar view, but evidently with other size and proportions. You can perfectly dismiss the popover on the portrait mode, and compose your new view with a tableview controller at the left side of the screen.

Resources