Search code examples
iosswiftanimationnavigationbar

Unwanted fast animation when collapsing navigationbar


I have this weird problem when I scroll to collapse the navigationbar. I have a view with a TableView, embedded in a navigationbar controller with large titles. When I scroll my view to make the navigationbar collapse, the animation is very fast. It almost looks like lagging. I tried to look around but had no luck.

Am I doing something wrong?

EDIT: After some debugging I've found out that the problem starts when I populate my TableView. If the TableView has not data to display, the NavigationBar collapsing animation works smoothly. Still no solution.


Solution

  • I solved the problem. You should set the top constraint of the tableview to the TopView and not to the SafeArea.