Hi,
Ankit garg
21

Hi,

just move your layout code to viewDidLayoutSubviews method

func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
topLabelView.frame.origin.x = view.safeAreaInsets.left
topLabelView.frame.origin.y = view.safeAreaInsets.top
topLabelView.frame.size.height = 300
topLabelView.frame.size.width = view.bounds.width — view.safeAreaInsets.left — view.safeAreaInsets.right
}

Also, I suggest you to see example
https://github.com/rosberry/SafeAreaExample

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.