嘿,我正在创建一个带有多个动态单元格的桌面视图。我希望一个单元格与其他所有单元格大小不同,但我不确定如何准确地执行heightForRowAtIndexPath方法。有没有人能带我经历一下该怎么做?
override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
if ( indexPath.row % 8 == 7 ) {
// I want height to equal 20
}
return //not sure what I am supposed to return
}谢谢
发布于 2015-07-29 17:24:17
如果实现此委托方法,则必须处理表的每一行:
tableView.rowHeight,因此要使高度成为默认高度,请返回该高度。https://stackoverflow.com/questions/31707125
复制相似问题