I have a problem with a scrollable layout I have two UiViewController :
One on the top with a green background (TopVC) and the other is red (the initial VC) which are perfectly scrollable
When I start the app, I have this layout problem : I see the bottom of the other VC(the green one).
When I start to scroll, this layout problem dissapear and I can scroll up and down without any layout problem.( as you can see the SafeAreaView covers the entire screen as expected )
Does someone know how I can fix that in order to start with a correct layout ?
Thanks
For info, the project that I have tested :(link of the github project)
Fixed with :
if let top
= UIApplication.shared.windows.first?.safeAreaInsets.top
{
scrollView.contentInset.top = -top
}