swift - Tableview estimated row height in ios 8 -
i using following code scrolldown tableview bottom:
let numberofsections = tableview.numberofsections() let numberofrows = tableview.numberofrowsinsection(numberofsections-1) let indexpath = nsindexpath(forrow: numberofrows-1, insection: 0) tableview.scrolltorowatindexpath(indexpath, atscrollposition: .bottom, animated: true)
it works unless use following line, code not working properly.
tableview.estimatedrowheight = 44
how can solve problem ?
it looks need set row height automatic dimensions. check out article http://natashatherobot.com/ios-8-self-sizing-table-view-cells-with-dynamic-type/
to set self-sizing cell, add autolayout cell, specify tableview’s estimatedrowheight, , set tableview’s rowheight uitableviewautomaticdimension (this default setting in future xcode6 versions).
tableview.estimatedrowheight = 89 tableview.rowheight = uitableviewautomaticdimension
Comments
Post a Comment