问题
网络有很多UITableView的HeaderSection悬停和取消方法,我试用感觉还是存在问题!设计师喜欢用
UITableViewStylePlain的样式来处理背景颜色[UIColor groupTableViewBackgroundColor]
解决
现在就设置取消悬停的处理方法,不一定是最好,我觉得这个应该是可行的,
FooterInSection和HeaderInSection那个代理自己决定~
-
设置
style:UITableViewStyleGrouped -
- (nullable UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section的代理方法中自定义View,是否重用自己考虑;
- (nullable UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
UIView *footerView = [[UIView alloc] init];
footerView.backgroundColor = [UIColor whiteColor];
return footerView;
}
-
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section的代理方法设置对于的高度;
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 20;
}










网友评论