I have a problem with a layout on iOS, which isn't updated the first time. This works perfect, up to the moment, when the keyboard appears.
The layout looks like the following
RelativeLayout
- StackLayout
-- ScrollView (green)
--- StackLayout (red)
---- ImageView (yellow)
---- Label (yellow)
- StackLayout
-- Entry
-- Button
When I call this the first time, it looks like image Layout1. The Label istn't layouted correct. The yellow box should only as big as the text inside. If I pop the page and push it again, it looks correct (see Layout5). Only the first time it isn't correct. I could handle this by calling the following in `OnAppearing' of the view (ContentLayout is the StackLayout holding the ScrollView)
var bounds = ContentLayout.Bounds;
bounds.Height += 1;
ContentLayout.Layout(bounds);
But this isn't very nice. And `ContentLayout.ForceLayout() don't work in this case.
That wouldn't be a problem, because the background is all white and so you don't see the size of the Label. But this is an input page. At the bottom there is an Entry field. If I select this Entry field, the keyboard appears and triggers a layout of the ScrollView (to be correct: a layout of the Page). You could see this in Layout2. At this point, it seems, that the ScrollView don't get the correct height of the content, even if the layout is now correct, so that you could scroll beyond the bottom of the Label (see Layout3, the green part shouldn't be visible). Also you couldn't see a scroll bar while scrolling. So I assume, that the ScrollView hasn't a correct height. Even this isn't a big problem.
Now I leave the keyboard with hitting "return" on the keyboard. The result could be seen in Layout4: the StackLayout has the correct size inside the ScrollView, but the ScrollView isn't at the top. This is now a problem, because you couldn't scroll in the ScrollView, because the content is as high as the ScrollView.
I'm now searching for a solution to force a layout of the ScrollView content for the first time.
Any sugestions welcome