Xamarin iOS SafeAreaInsets, where I should recalculate size of my controls?

Viewed 49

I need to use SafeAreaInsets in Xamarin iOS app. I've overrided OnAppearing() method and write some code for recalculating controls size like that:

protected override void OnAppearing()
{
  var safeInsets = On<iOS>().SafeAreaInsets();
  StatusBar.Padding = /* ... */;
  base.OnAppearing();
}

This code works correctly, but seems it works after page already displayed, so I see for a second my page without sizes updating. But in documentation I see that OnAppearing() method should be executed before page Page become visible.

What I'm doing wrong?

1 Answers
Related