第一个cell 遮挡 tabView 效果
2019-01-12 本文已影响7人
九月_adhoc
1.设置一个空的uiview
UIView * view = [[UIView alloc] init];
view.backgroundColor = [UIColor clearColor];
self.tableView.tableHeaderView = view;
self.tableView.tableHeaderView.height = 75;
[self.tableView addSubview:self.bottomImageView];
2.移动view 到底部
-(void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if([indexPath row] == ((NSIndexPath*)[[tableView indexPathsForVisibleRows] lastObject]).row){
dispatch_async(dispatch_get_main_queue(),^{
if (indexPath.section==0) {
[tableView sendSubviewToBack:self.bottomImageView];
[tableView.tableHeaderView removeFromSuperview];
}
});
}
}