UISearchController misplaces UISearchBar

别说谁变了你拦得住时间么 提交于 2019-12-24 06:45:21

问题


I am using the UISearchController on a modal page to allow a user to search some data. The page uses a table view controller design and the searchBar is in a tableViewCell.

When the user taps on the searchBar, the UISearchController animates the layout to slide the table header to the top of the page and moves the searchbar. However it does not end up in the right place. It does not move sufficiently up.

Anyone have a suggestion on how to help the UISearchController to position the searchBar correctly?

Before tapping the search bar (looks ok)

After tapping the search bar (search bar in wrong place)

来源:https://stackoverflow.com/questions/31611874/uisearchcontroller-misplaces-uisearchbar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!