I have an app that is a single view: a UIWebView that gets pdfs loaded into it. The pdfs are loaded from an ECSlidingViewController.
For some reason, when the app goes from portrait to landscape, the WebView remains in the same position and there is a large dark area to the left of the screen.
Portrait:
Landscape:
I have tried a number of techniques, but they each have problems. For example I can't simply reload a landscape view when the orientation changes, the user will lose their place in the webview. Any ideas?
Related
Hello stackoverflow community,
I have just added the constraints to my iPad app and would now like that if you hold the iPad across that you can scroll the page, because not everything fits on a transverse page. If the Ipad is upright you should not be able to scroll (there everything fits).
How can I make that happen?
Edit:
I would like to be able to use landscape mode on my app, which I originally designed to be portrait only. For this I have already inserted all constraints so that the size etc. fits. Now, however, the page is so full that it no longer fits on the complete display in landscape mode. Now I would like to be able to scroll down and thus the complete page is on the display. How it looks at the moment in portrait and landscape format I have loaded into the attachment (do not wonder the app is in German).
Landscape
Portrait
add your views into UIScrollView and set its contentsize, you can thencontrol what should be visible or scrollable for both portrait and landscape
The app I'm developing uses a UINavigationController to control a variety of UIViewControllers, some of which are displayed in portrait orientation, and some of which are displayed landscape. Once one of the landscape ones is displayed, if I navigate back through the pages to the root view, part of the keyboard is still displayed landscape:
...instead of how it should be (and originally is) displayed:
I've paused the debugger (attached to the iPod) when the root view is loaded after displaying the landscape view, and in lldb, run po [UIDevice currentDevice].orientation. It outputs 1, which is the value for UIDeviceOrientationPortrait. So although the device knows it's in portrait mode, part of the keyboard is landscape. I've never seen anything like this before, and am not sure what else to check.
My app is iPhone-only but can be viewed on iPad using the 1x/2x-mode. The following behavior appears only on iPad. When I start a html5-video from the UIWebView it is automatically shown in the native movie player. When I quit the player the web view is visible again but now with a black area - like a bar - on top of the view so it looks as if the view was cropped. It is like a black overlay with the width of the web view (which indeed takes the whole screen). How do I get rid of this thing and what is the purpose of it anyway?
UPDATE:
It seems to have something to do with a "rotation frame". The main view is for portrait mode only - rotation is prohibited, but the native movie player allows landscape mode.So when I watch the video in landscape mode and tap on "done" I can see the "bar" rotate. (As documented in screenshot.)
I have an app which runs only in Landscape mode. All working well. But I have few pop-up views like Apptentative feedback view and Twitter Sheet view, works great when in portrait mode. So how can I change orientation forcefully when loading these pop-ups and back to landscape when these pop-up closes.
You can't force an orientation change. You can only support changes in orientation. IE moving the device 90 degrees to the right.
In my iPad app, i am supporting only portrait mode except on one screen. I have tab bar at bottom, on click of any tab,it opens a small view of size 320.0 * 600.0, with table view. On selecting any row in small view, a full screen view opens up. Problem is that when i came on full screen view which supports all orientations, next time,my other view especially the small view comes up with frame size of 768 * 1024.
Any sugeestions or help is appreciated!
I'm guessing the problem is that you read the frame size while still being in landscape mode. If you are running things in the simulator, it probably jumps back to portrait when you dismiss the full screen? This forces the app back to "portait" mode without triggering the normal "willRotate" functionality, and could possibly mess up your code for keeping track of orientations.
Also keep in mind that most apps needs to support all orientations on the iPad to get accepted, unless you're making e.g. a game which is normally specifically designed for either landscape or portrait.