Open eliotstock opened 9 years ago
Having run the examples now, I see that I shouldn't expect the unwinding to happen automatically. The user will just have to click Back above after changing the value. So the only issue is that the checkmark doesn't move.
What I do, is put some code to pop back to the parent view on the navigation controller stack. Like this:
(in your didChangeState method)
[self.navigationController popViewControllerAnimated:YES];
Not sure about Swift but might look like this:
if let navController = self.navigationController {
navController.popViewControllerAnimated(true)
}
I'm getting this problem in v 1.2.13 when selecting an option for a field with an array of strings as the options. I have a dynamic form, building up a set of fields in a fields() method on the form. The problem field is defined like this:
where the options are:
Because I'm using keys generated at runtime, I've overridden valueForUndefinedKey() on the form.
If I click the field I get a new view pushed onto the nav controller as expected. If I then click a value the didChangeState action is called properly, but the UI doesn't unwind back to the main form view. It also doesn't move the checkmark from the old value to the new one I just clicked. How do I make this work?
Thanks.