objective c - size class for table row height in iOS storyboard -


i develop ios app swift , storyboard. placed table , need change table cell height depending on screen class, can't find such option in table options. see cell height defined table view / row height option, doesn't support class sizes.

this problem happens because set fonts of labels in cell prototype using size classes, bigger screens fonts bigger, row height can't changed per size class. need higher row bigger fonts, obviously. approach should use achieve it?

obj-c code too.

let me answer own question - in ios 8 it's possible enable auto layout cells using uitableviewautomaticdimension table's row height:

override func viewdidload() {     super.viewdidload()      tableview.estimatedrowheight = 89     tableview.rowheight = uitableviewautomaticdimension } 

estimatedrowheight needs set too.

links:

http://natashatherobot.com/ios-8-self-sizing-table-view-cells-with-dynamic-type/

http://www.appcoda.com/self-sizing-cells/

https://stackoverflow.com/a/28918600/1028256


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -