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

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

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

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

    }

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

大家讲道理
大家讲道理

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

全部回覆(3)
小葫芦

請問題主解決了嗎?

大家讲道理

首先:講道理,你這個 TabBar 不應該是加在 headerView 上,因為 TabBar 應該是固定位置吧。
其次:做這個介面,最好分開處理視圖,不要使用 UISearchController,而是去使用自訂的 TabBar + UISearchBar + UITableView

PHPzhong

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

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

searchbar自动上移-20,删除searchbar里面的UISearchBackground时。
只能对searchbar背景有用,標題列沒有效果,就是顯示運營商,wifi訊號的背景

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板