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.
heightForRowAtIndexPath:(NSIndexPath *)indexPath根据 iOS 文档,不推荐使用tableView 。它提到使用 rowHeight 代替,但该属性适用于所有行。我想流动行的高度与内容的(UILabel)不同的大小。
heightForRowAtIndexPath:(NSIndexPath *)indexPath
UILabel
几个自定义单元格样式是我唯一的选择heightForRowAtIndexPath吗?
heightForRowAtIndexPath
http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewDelegate_Protocol/Reference/Reference.html
很抱歉告诉你……但它没有被弃用;)
编辑:他们唯一说的是,如果您有非常大的表格(1000 多个单元格),由于性能问题,最好使用 rowHeight。