当前位置:首页 > 操作系统 > Ios

ios7 searchResultsTableView bug

ios7上面,searchResultsTableView存在一个bug:

就是每搜索一次,searchResultsTableView的contentSize会加大一些,最后会留出很多空白。

解决方法:

添加如下回调:

- (void)searchDisplayController:(UISearchDisplayController *)controller willShowSearchResultsTableView:(UITableView *)tableView

{

    [tableView setContentInset:UIEdgeInsetsZero];

    

    [tableView setScrollIndicatorInsets:UIEdgeInsetsZero];

}

原文:http://www.cnblogs.com/417460188dy/p/3977939.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!