ios - 关于UISearchController偏移问题
大家讲道理
大家讲道理 2017-04-17 17:59:46
0
3
360

serachBar的位置改变不了吗?
我知道是多了我那两个按钮的高度,但是怎么能让他上去呢?

  • (void)updateSearchResultsForSearchController:(UISearchController *)searchController{

    
    [self.kwSearchController.searchBar setFrame:CGRectMake(0, 0, KScreenWidth, 44)];

    }

我是加在tableView的HeaderView上的
在这个代理里修改位置也不好使

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(3)
小葫芦

Has the problem been solved?

大家讲道理

First of all: Logically speaking, your TabBar should not be added to the headerView, because the TabBar should be in a fixed position.
Secondly: To make this interface, you'd better handle the views separately. Instead of using UISearchController, use a customized TabBar + UISearchBar + UITableView

PHPzhong

self.definesPresentationContext = YES;就可以解决了
但是,uisearchController还有其它问题,
没用UISearchDisplayControllerEasy to use.

DangUISearchControlleractive时,就是触发时,
你怎么解决标题栏的背景色的?不是navigation background.

searchbar自动上移-20,删除searchbar里面的UISearchBackground时。
只能对searchbarThe background is useful, but the title bar has no effect. It just displays the background of the operator and wifi signal

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template