Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在表格视图中使用自定义单元格。我设置了单元格的高度,但只有表格中的第 10 个单元格需要调整大小。
您需要实现该UITableViewDelegate方法heightForRowAtIndexPath:
UITableViewDelegate
heightForRowAtIndexPath:
像这样的东西:
- (CGFloat) tableView: (UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { if ( indexPath.row == 10 ) return 100.0; return 40.0; }