Closed MoLice closed 3 years ago
Bug 表现 当 UISearchBar 作为 tableHeaderView 使用时,如果 UITableView 显示了 sectionIndex,那么 searchBar 内部会自动在右边腾出空白,如下图所示:
但当 sectionIndex 隐藏后,searchBar 没有刷新,依然保留那段空白,这应当是不符合预期的。
如何重现
以下是可重现的 Demo:TestSearchBarInsets.zip。注意解决方案也在 Demo 里,只是被注释掉了。
预期的表现 sectionIndexTitlesForTableView 发生变化时,searchBar 的布局都应该得到刷新。
其他信息
已发布 4.2.3 修复该问题。
Bug 表现 当 UISearchBar 作为 tableHeaderView 使用时,如果 UITableView 显示了 sectionIndex,那么 searchBar 内部会自动在右边腾出空白,如下图所示:
但当 sectionIndex 隐藏后,searchBar 没有刷新,依然保留那段空白,这应当是不符合预期的。
如何重现
以下是可重现的 Demo:TestSearchBarInsets.zip。注意解决方案也在 Demo 里,只是被注释掉了。
预期的表现 sectionIndexTitlesForTableView 发生变化时,searchBar 的布局都应该得到刷新。
其他信息