Ios 当UIsearchController搜索栏处于活动状态时,状态栏的位置会显示一个间隙
在显示项目列表的myIos 当UIsearchController搜索栏处于活动状态时,状态栏的位置会显示一个间隙,ios,objective-c,uinavigationbar,uisearchbar,uisearchcontroller,Ios,Objective C,Uinavigationbar,Uisearchbar,Uisearchcontroller,在显示项目列表的myUIViewControllerOneUITableView中,我在UIViewController中添加了UISearchController而不是UITableView.tableHeader。并添加另一个结果UITableViewController,以显示结果。并添加了属性hidesNavigationBarDuringPresentation=yes 至UISearchController。 但我的问题是,当我开始搜索时,UISearchController和屏幕顶
UIViewController
OneUITableView
中,我在UIViewController
中添加了UISearchController
而不是UITableView.tableHeader
。并添加另一个结果UITableViewController
,以显示结果。并添加了属性hidesNavigationBarDuringPresentation=yes代码>
至UISearchController
。
但我的问题是,当我开始搜索时,UISearchController
和屏幕顶部之间有一个间隙,UISearchController
没有扩展高度。我的UISearchController.searchBar
如下所示
但我需要像下面给出的图片一样
你能帮帮我吗,
谢谢。使用UI更改状态栏背景色SearchBarController背景色您的问题解决方案我使用了自定义的“UINavigationBar”,还使用了“[self-setEdgesForExtendedLayout:UIRectEdgeNone];”用于“导航栏”下方的“UISearchController.searchBar”