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.
Related
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.
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
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.
I have application that is only landscape with no other orentation supported.
But when I open modal view (modal contains UIWebView ([printView setView:webView])) it rotates the device to portrait.
The content stays in landscape view only iPad orientation. I mean the statusbar is rotated like it's in portrait. So I want no rotation at all, just to stay in landscape.
I have solved the problem. Problem was in viewController that was programaticly created.
Solution is to create viewControler and in .m file force landscape orentation.
I have an iPad Split View Application that brings up a modal view to display certain content. When I bring up the modal (in PageSheet style) and then change from Portrait to Landscape (or vice-versa) and then dismiss the modal the orientation of the detailViewController (the parent of the modal) turns 90 degrees.
So if I am in landscape mode when I close the modal the right pane will turn as if it were in portrait mode but the device is still in Landscape and the rootViewController is still visible. After this happens no rotation will solve the problem until the view is removed.
Any idea what I've screwed up here? I've had a ton of trouble with iPad rotation handling in general but this one is really giving me problems.
If you are presenting the modal view from either of the two sub-views of the SplitViewController, then you will have the orientation problems. Just present the modal view from the SplitViewController.