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

calli23 picture calli23  路  3Comments

Sweeper777 picture Sweeper777  路  3Comments

Tomas1405 picture Tomas1405  路  3Comments

sedwo picture sedwo  路  3Comments

thlbaut picture thlbaut  路  3Comments