Xamarin.Forms ListView not properly resizing (only on iOS) - ios

I'm using a ListView in Xamarin.Forms. I have a problem with the resizing of the rows. When I start my application on portrait mode, the width of the rows fill the screen (as intended), but when I rotate to landscape mode they become wider. So far so good, but when I switch back to portrait again the rows stays the width as they were on landscape mode. This behaviour is not seen on an Android application with exactly the same code.
I've only tested this on the iOS simulator so far. It has the same behaviour on the iPad and the iPhone simulator.
Have I encountered a bug?

Related

Cordova ipad app 100% height issue

I just made an ios app through cordova, iphone app looks fine because I am using always portrait mode for iphones but for ipads I am using always landscape mode with locked rotation. The problem is when I ma build an app and run it on my ipad the landscape works fine the rotation is locked but the main issue is that I have set 100% height on body, and somehow its not working on iPad landscape. Looks like that 100% doesnt detect landscape mode and automatically was set 1024px for height because if I am set 768px height for body in inspect then the whole app looks fine as should.
Any ideas what can be the issue there ?
Don't set width and height if you set the scale
From apple doc
You do not need to set every viewport property. If only a subset of
the properties are set, then Safari on iOS infers the other values.
For example, if you set the scale to 1.0, Safari assumes the width is
device-width in portrait and device-height in landscape orientation.

iPad screen doesn't support autolayout

I have created view using autolayout it works fine in all iPhone devices but it left some blank space at left, right, top and bottom on iPad.I tried to make another xib specially for iPad which is 768*1024 but still facing same problem.
here is the screenshot of iPad output.
The problem is that you forgot to make this a universal app. So it is running on the iPad in emulation mode as an iPhone app in a reduced frame.

How to Horizontally Center View in Landscape orientation?

I have an app that was originally written for iPhone 4s landscape mode (480x320) but when I run this in iPhone 5 simulator I see that my app is aligned to the left and there's alot of blank space to the right of it. (vertically, it looks/stretches properly)
I was hoping my app would atleast be centered in landscape mode in iPhone5, any ideas?
Also, I have another app that is in portrait mode (320x480) and in iPhone 5 is does vertically center my app properly. So is this just a problem with landscape?
Found it in Size Inspector -> "AutoResizing".
Just had to align the red box correctly

iPad scales iPhone app incorrectly

When I run the app on the iPad it uses currently the 4 inch screen which does not fit on the screen of an iPad, the app is an iPhone only app, but I want to run it on the iPad with scaling up the 3.5 inch screen.
How can I force the iPad to use the 3.5 inch screen and not the 4 inch?
And also the status bar is shown on the iPad and not on the iPhone, why is that also different?
The status bar on iPad in combatibility mode is completely outside of your reach. It's displayed on the edge of your screen not on the edge of the application window. This behavior cannot be modified by the application. Logically, you need the normal iPad status bar and you can't have another in the application. On the other hand, there is no reason to hide the iPad status bar because it can never overlap the application in compatibility mode.
The 4-inch is strange because iPads always show iPhone applications as 3.5 inch. If you see bad dimensions on the screen, then it's a bug in your code. Make sure you are setting frame sizes correctly.

Apps UIWebView stuck on landscape on iPad on iOS 7

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.

Resources