【发布时间】:2017-08-02 08:15:00
【问题描述】:
我有一个带有 UITableView 和 自定义视图 的视图控制器。情节提要配置是 自定义视图 与 对齐我的视图控制器主视图的顶部、前导和后边距。自定义视图具有恒定高度。 UITableView 的 top 与Custom View 的bottom 对齐。 UITableView 的 leading, trailing and bottom 与主视图的leading, trailing and bottom 对齐。我正在添加一个 UISearchController 的搜索栏 作为 UITableView 标题。这个视图控制器被推送到 UINavigationController Stack。现在,当用户点击 搜索栏 时,导航栏会隐藏起来,为搜索栏让路。但由于 自定义视图 位于 UITableView 上方,因此它可以容纳UISearchBar 应该是。我还想将 Custom View 移出并占据 UISearchBar 位置,这在没有上述 Custom View 的情况下是正常情况下的。帮助将不胜感激。
【问题讨论】:
标签: ios uitableview uinavigationcontroller uisearchcontroller