I've a web application for iphone/ipad. When I view it in mobile safari it appears good both in landscape and portrait mode. But when I open it in my own ipad web app (under uiwebview), it appears good in landscape mode, but contents are cut-off in portrait mode.
How to fix it. Am i supposed to fix it on server side, or in ipad application?
Regards
If it works in Mobile Safari and not in your wrapper app using UIWebView, it is possible that the problem comes from the application, and that your webview is not properly resized when the device rotates to landscape.
Try setting the webview's autoresizingMask as follow in your view setup code :
webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
or, if you defined your webview in Interface Builder, use the "size inspector" to set the appropriate autoresizing mask (every red line must be selected in the resizing diagram).
Related
I am currently developing from Visual Studios, we have been working on iPhone primarily, but a scope has crept in to support iPad.
We are using Xamarin.Forms.Shell for our main page and navigation, but all the content pages are not filling the iPad. The navigation buttons are at the bottom as expected, but the content within while in portrait stops half way.
in info.plist I have Device Orientation checked all boxes, devices set tot Universal.
This happens on all pages.
What could I be missing?
Your VerticalOptions could be not set to expand, e.g: StartAndExpand or FillAndExpand.
Also, your stackLayout HeightRequest could be setted. If so, then the height will be limited as is.
Check also the main orientation of your project, if is Portrait or Landscape.
If the steps above don't work, please, edit your question and put the XAML of this page.
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
I am writing an application that runs on Android TV 5.1 or newer that uses the WebView as the display rendering engine. I am able to set the desired display orientation, but the WebView rotates back to landscape within the display and maintains the correct aspect ratio.
I have tried using CSS to perform a transform but the aspect ratio is not correct. I have not found a method to force the WebView to rotate and fit the parent window.
Is there any method to set the orientation and size of the WebView itself? I see the same behavior on multiple devices.
This behavior is device specific. Some of the devices I have tested rotate as expected, another device rotates the display, but the WebView rotates back into landscape. The remaining devices I have tested do not rotate at all.
I will make this will be a known limitation of running this application on Android TV devices.
I have an iPad app that is written for Portrait mode; I am trying to add Landscape mode to it using Auto Layout. Everything appears to work just by changing the Size Classes in XCode, except some of the pages are longer when displayed in Landscape mode. My thoughts are to just add a UIScrollView to each page that needs it, at the top of the view hierarchy.
Is this the preferred method of solving this issue?
Yes, when designing an app for both landscape and portrait orientations you usually will need to make the content scrollable in landscape orientation.
You can also create a different layout for the landscape orientation and completely re-layout the UI components when the app rotates, but for simplicity putting all of your objects in a scroll view will solve your issue of limited real estate on the screen.
I have an iOS 5 + app I am getting ready for iOS 7.
I have a standard TabBar based app loading in viewcontrollers, one of which loads in a webView.
This webview has a landscape and portrait mode as the app can be rotated, this works fine on all devices except iPad running iOS 7.
The issue being the webview is always displayed as landscape on iPad on iOS 7 irrespective of the orientation, iOS 7 gets rid of the 2x button that you used to get with iPhone apps running on an iPad so it is faux full screen.
The app opens in portrait mode, if I rotate the iPad everything else rotates - all other views adjust and reposition - except the html in the webview - it is stuck on landscape.
This happens on device and simulator
The question I suppose is why? has anyone else had experience of this?
Many thanks
Try setting constraints on the UIWebView. In the storyboard, look for the menu icons on the bottom right, and select the one that looks like a tie fighter. Then select 'Add Missing Constraints' or 'Reset to Suggested Constraints'. then when your View changes (orientation), the space constraints will adjust.