Closed kevinrenskers closed 12 years ago
This is a tricky thing. It used to work like you want, but after using it for a couple of things, I ended up changing to separate the button from the cell click, so it's more modular.
After you set the boolValue, you need to call [self.quickDialogTableview reloadCellForElements:element] to refresh the cell.
Not sure what the default behavior should be, maybe we make the option to do the other as a setting.
Aha, I guess that solves #176 as well :)
Even though this workaround works, you need to do this for every QBooleanElement you use... Even the sample app is "broken" like this.
Yup. The tableview is never updated by default and that's by design. Your view controller should really be in charge of updating the view as necessary. You'll need to do this every time you update the table. You can also call table.reloadData if you want to refresh the entire thing at once.
Fair enough, good to know :)
Also, for people finding this in the future: the method is nil-terminated like this: [self.quickDialogTableView reloadCellForElements:sender, nil];
When you add a QBooleanElement with a controllerAction, the action is called whenever you change the value of the switch. However, when you touch the tablecell itself, the action is also called, yet the switch is not changed.