Eureka: rowByTag("myTag").hidden doesn't work?

Created on 24 Oct 2015  路  2Comments  路  Source: xmartlabs/Eureka

Here's the bit of code, I'm running this after an async http fetch. Though I'll just hardcode it for now.

How come the button isn't being hidden?

if let buttonRow = self.form.rowByTag(self.kDeleteRowTag) {
                buttonRow.hidden = true
                buttonRow.updateCell()
            }
Hiding & Disabling Rows

Most helpful comment

OH wow okay awesome. This worked!

if let buttonRow = self.form.rowByTag(self.kDeleteRowTag) {
                buttonRow.hidden = true
                buttonRow.evaluateHidden()
            }

All 2 comments

Hey @mbalex99 , updateCell does not evaluate hidden condition, it only updates the tableViewCell according row info. You can invoke buttonRow.evaluateHidden() to force the evaluation of hidden condition, it will make the cell visible/invisible if needed.

Regards

OH wow okay awesome. This worked!

if let buttonRow = self.form.rowByTag(self.kDeleteRowTag) {
                buttonRow.hidden = true
                buttonRow.evaluateHidden()
            }
Was this page helpful?
0 / 5 - 0 ratings

Related issues

geoherna picture geoherna  路  14Comments

marbetschar picture marbetschar  路  18Comments

daveparks23 picture daveparks23  路  17Comments

murraycollingwood picture murraycollingwood  路  16Comments

ffittschen picture ffittschen  路  24Comments