I\'m facing an issue where the large title navigation bar collapses very abruptly when scrolling on a UITableView embedded inside of a UIViewController. The problem seems to onl
I had a similar looking issue and solved it by removing UINavigationBar.appearance().isTranslucent = false
from my AppDelegate.
UPDATE: If you don't want translucency, you should enable extendedLayoutIncludesOpaqueBars. That way all the glitches are fixed.
I faced same issue - I had UIViewController
embedded in UINavigationController
, the UIViewController
had tableview with leading, trailing, top, bottom constraints to safe area. The whole tableview behaved jumpy / snappy. The trick was to change top constraint of tableview to superview.
Here I recorded changing the constraint tableview iOS 11 bug constraint change
Put this line of code on your UIViewController containing UITableView and works fine for me.
Swift
extendedLayoutIncludesOpaqueBars = true;
Objective-C
self.extendedLayoutIncludesOpaqueBars = YES;
Set UITableView AutoLayout top space to "Superview" instead of "Safe Area"
In Interface Builder:
It worked with me.
Reference
Soolar's answer is right, but I don't know how to fix it in storyboard. Finally I solved the problem with Roman's solution in another question, by adding:
NSLayoutConstraint.activate([
scrollView.topAnchor.constraint(equalTo: view.topAnchor),
scrollView.leftAnchor.constraint(equalTo: view.leftAnchor),
scrollView.bottomAnchor.constraint(equalTo: view.bottomAnchor),
scrollView.rightAnchor.constraint(equalTo: view.rightAnchor)
])
in viewDidLoad
.
Original answer: https://stackoverflow.com/a/48321447/1386369