Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rowByTag("myTag").hidden doesn't work? #48

Closed
mbalex99 opened this issue Oct 24, 2015 · 2 comments
Closed

rowByTag("myTag").hidden doesn't work? #48

mbalex99 opened this issue Oct 24, 2015 · 2 comments

Comments

@mbalex99
Copy link

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()
            }
@mbalex99 mbalex99 changed the title buttonRow.hidden doesn't work? rowByTag("myTag").hidden doesn't work? Oct 24, 2015
@mtnbarreto
Copy link
Member

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

@mbalex99
Copy link
Author

OH wow okay awesome. This worked!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants