0
-(void)viewWillAppear:(BOOL)animated{
    self.cell4.frame = CGRectMake(self.cell4.frame.origin.x, self.cell4.frame.origin.y, self.cell4.frame.size.width, self.cell4.frame.size.height + 60);
    self.cell5.frame = CGRectMake(self.cell5.frame.origin.x, self.cell5.frame.origin.y + 60, self.cell5.frame.size.width, self.cell5.frame.size.height);
}

我发现单元格的框架已经改变,但在 ui 中它没有改变。有什么工作应该做吗?

4

1 回答 1

0

在里面写代码

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    // set cell's height yourself

}

会修复它。

于 2013-01-21T13:11:06.880 回答