titleForHeaderInSection is overlapping the UISearch field
I'm having a problem where the titleForHeaderInSection is overlapping the UISearch field when a user sc开发者_StackOverflow中文版rolls the table.
I'm using the following code to offset a prior problem I had where the sectionIndexTitlesForTableView was overlapping the Cancel button. Now I have the section titles overlapping the UISearch field. Here's the code I have:
-(void) scrollViewDidScroll:(UIScrollView *)scrollView { searchBar.frame = CGRectMake(0,MAX(0,scrollView.contentOffset.y),320,44);
}
thanks for any suggestions.
try clipping the sub views. Refer this similar post for more information
精彩评论