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

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -