如何隐藏不包含数据的section?

如何隐藏不包含数据的section


互换的青春
浏览 899回答 3
3回答

芜湖不芜

我现在的做法是在-(CGFloat)tableView:(UITableView *)tableViewheightForHeaderInSection:(NSInteger)section中返回0,在-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cellforRowAtIndexPath:(NSIndexPath *)indexPath 中[cellremoveFromSuperview]

慕妹3146593

解决了,先把tableView.sectionHeaderHeight = 0;tableView.sectionFooterHeight = 0;再根据需要实现:- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section就可以控制group模式隐藏section了。

慕少森

UITableview中隐藏静态section的方法_paymentCell.hidden = YES; self.tableView.contentInset = UIEdgeInsetsMake(-90, 0, 0, 0);
打开App,查看更多内容
随时随地看视频慕课网APP