iOS 11 UIRefreshControl with NavigationBar LargeTitle and SearchController disappearing

前端 未结 3 785
我寻月下人不归
我寻月下人不归 2021-01-07 22:54

I have a navigationBar with largeTitle and searchcontroller and my tableView has a refreshcontrol.

When I pull to refresh the activityIndicator of refreshcontrol di

3条回答
  •  抹茶落季
    2021-01-07 23:47

    I searched a solution for this for weeks already and today, I finally made it work. The solution is so simple, I can't believe I haven't found that earlier.

    I was using a normal UIViewController with a UITableView. My layout constraints were setup so that the UITableView was pinned with 0 to the bottom and top layout guides like so:

    Once I changed that and pinned the UITableView to the Superview with 0 to all edges, it magically started to work:

    I didn't even have to setup anything else. I hope so much that this does the fix for you as well because its just so annoying...


    If the above doesn't work, than you need in addition to it, set

    self.extendedLayoutIncludesOpaqueBars = YES;
    

    or check the "Extend Edges / Under Opque Bar" in the Storyboard

提交回复
热议问题