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

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -