【发布时间】:2015-04-17 07:36:03
【问题描述】:
点击 UISearchController 的搜索按钮后,滚动指示器停止在键盘高度。 我记录了 contentsize,它打印为 1056.000000 所有参数的 EdgeInsets 都是 0 scroll indicator image
任何使其正确的建议
【问题讨论】:
标签: ios vertical-scrolling uisearchcontroller
点击 UISearchController 的搜索按钮后,滚动指示器停止在键盘高度。 我记录了 contentsize,它打印为 1056.000000 所有参数的 EdgeInsets 都是 0 scroll indicator image
任何使其正确的建议
【问题讨论】:
标签: ios vertical-scrolling uisearchcontroller
遇到问题,需要将 insets 设置为零
- (void)searchDisplayController:(UISearchDisplayController *)controller willShowSearchResultsTableView:(UITableView *)tableView {
[tableView setContentInset:UIEdgeInsetsZero];
[tableView setScrollIndicatorInsets:UIEdgeInsetsZero];
}
【讨论】:
嗯,您可能遇到了与我相同的问题,已通过进入情节提要并重新排序您特定 iOS 屏幕上的控件来解决:
Why is there extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7
这个错误在 iOS 8.2 中仍然存在,令人讨厌,并且似乎影响任何带有垂直滚动条的标准 iOS 控件(UITableView、UIScrollView、UITextView 等)
【讨论】: