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/
Comments
Post a Comment