Strange UISearchDisplayController view offset behavior in iOS 7 when embedded in navigation bar

前端 未结 9 986
难免孤独
难免孤独 2020-12-14 03:13

I am building an iOS 7-only app. I am trying to set a UISearchDisplayController into the navigation bar.

I have it set up like this: In the storyboard, I added a \"

9条回答
  •  被撕碎了的回忆
    2020-12-14 03:43

    I remember running into the same exact problem that you are observing.There could be a couple of solutions you can try.

    • If you are using storyboards You should click on the view controller or TableView Controller which you have set up for your tableview and go to its attribute inspector and look under ViewController section and set the Extend Edges section to be under Top Bars.

    • If you are not using storyboards you can manually set the settings using the viewcontrollers edgesForExtendedLayout property and that should do the trick. I was using storyboards.

提交回复
热议问题