3 回答

TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超7個(gè)贊
我現(xiàn)在的做法是
在-
(CGFloat)tableView:(UITableView *)tableView
heightForHeaderInSection:(NSInteger)section中返回0,
在-
(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell
forRowAtIndexPath:(NSIndexPath *)indexPath 中
[cell
removeFromSuperview]

TA貢獻(xiàn)1820條經(jīng)驗(yàn) 獲得超9個(gè)贊
解決了,先把tableView.sectionHeaderHeight = 0;tableView.sectionFooterHeight = 0;再根據(jù)需要實(shí)現(xiàn):- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section就可以控制group模式隱藏section了。

TA貢獻(xiàn)2019條經(jīng)驗(yàn) 獲得超9個(gè)贊
UITableview中隱藏靜態(tài)section的方法
_paymentCell.hidden = YES; self.tableView.contentInset = UIEdgeInsetsMake(-90, 0, 0, 0);
- 3 回答
- 0 關(guān)注
- 980 瀏覽
添加回答
舉報(bào)