Eureka Forms for iOS - variable row height?

5.3k views Asked by At

All --

I’ve just started using Eureka forms builder on an iOS project, and it has a lot of wonderful features. It’s very nicely done.

However, I eventually realized that there doesn’t seem to be a good way to customize the Height of any given row. [Interestingly, in the Example app, many different rows demonstrating different features are all the same height.]

Granted I can override heightForRowAtIndexPath (which I’ve tried) ... but rows (and indexes) get added dynamically when they’re hidden and unhidden, which makes things more complicated.

Before getting into even more workarounds for this: Is there a simpler / more elegant way of adjusting individual row heights within the framework itself?

I’d like to set the height of any given row within the definition of each Row, or its .cellSetup, .cellUpdate or similar closures.

enter image description here

Or even better, is there a straightforward way to have the UITableView respect the ‘intrinsic’ dimensions of only those labels which are used, according to the actual font sizes used? In other words, if the font in a given row is smaller, that row height should be correspondingly less.

Your help very much appreciated at this point.

Thank you in advance!

2

There are 2 answers

8
Reinier Melian On BEST ANSWER

try with this

 <<< TextRow().cellSetup({ (cell, row) in
                cell.height = ({return 10})
            })

this will change the height, I Hope this helps you

0
shbedev On

Update the cell's height:

TextRow.cellUpdate { cell, row in
   cell.height = { 10 }
}