suchen

Heim  >  Fragen und Antworten  >  Hauptteil

ios - 关于UISearchController偏移问题

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

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

大家讲道理大家讲道理2893 Tage vor367

Antworte allen(3)Ich werde antworten

  • 高洛峰

    高洛峰2017-04-17 18:01:46

    请问题主解决了吗?

    Antwort
    0
  • 大家讲道理

    大家讲道理2017-04-17 18:01:46

    首先:讲道理,你这个 TabBar 不应该是加在 headerView 上,因为 TabBar 应该是固定位置吧。
    其次:做这个界面,你最好分开处理视图,不使用 UISearchController,而是去使用自定义的 TabBar + UISearchBar + UITableView

    Antwort
    0
  • PHPz

    PHPz2017-04-17 18:01:46

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

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

    searchbar自动上移-20,删除searchbar里面的UISearchBackground时。
    只能对searchbar背景有用,标题栏没有效果,就是显示运营商,wifi信号的背景

    Antwort
    0
  • StornierenAntwort