I have a UITableView
object in my view controller and I added the following code inside viewDidAppear:
:
self.navigationController.hidesBarsOnSwipe = true
The navigation bar is hiding when I scroll up, but when I scroll down it's not coming back.
Do I need to do something else?
By default storyboard add tableview top constraint to "Top Layout Guide.Bottom", you need to change the tableview.top constraint to "View.Top"
check your constraints
for tableview
. It's top constraint
should be pin with superview's top
not with the toplayoutguide's top
. I think you have set constraint with toplayoutguide. So, try to change it with superview's top and your issue will be solved.
I think you need to uncheck Extended edges- under top bars to align your UITableView with topLayourGuide. Refer the attachment.