【发布时间】:2015-09-15 15:33:06
【问题描述】:
我有一个搜索视图,它显示一个 UITableView 和一个 UISearchBar 作为 tableHeaderView。滚动表格,文本重叠并显示在状态栏下方。我尝试过的所有解决方案都不起作用。我的偏好是将状态栏设为灰色,以匹配 UISearchBar,如建议的 here
我尝试过的其他方法都没有奏效。任何帮助将不胜感激。
【问题讨论】:
标签: ios swift uitableview uistatusbar
我有一个搜索视图,它显示一个 UITableView 和一个 UISearchBar 作为 tableHeaderView。滚动表格,文本重叠并显示在状态栏下方。我尝试过的所有解决方案都不起作用。我的偏好是将状态栏设为灰色,以匹配 UISearchBar,如建议的 here
我尝试过的其他方法都没有奏效。任何帮助将不胜感激。
【问题讨论】:
标签: ios swift uitableview uistatusbar
以下工作:
func positionForBar(bar: UIBarPositioning) -> UIBarPosition {
return .TopAttached
}
但副作用是现在搜索栏和第一个表格单元格之间存在偏移。
【讨论】: