I have this weird bug only in iOS 11, in lower iOS, everything works fine. The problem is that whenever pushing to a view controller, there is a black space appears on top of the navigation bar. Has anyone else experienced this problem and how to fix it?
21
votes
3 Answers
51
votes
The problem is that in case of double velocity that your view size is smaller then the navigation controller view size.
So when you scrolling trough the view's frame is changing during changing of content offset and it's doubles velocity as well.
That would explain that behaviour.
Please try following to fix the problem.
extendedLayoutIncludesOpaqueBars = true
You should add this line at your UIViewController
, UITableViewController
or UICollectionViewController
6
votes
print(view.safeAreaInsets)
– Vini App