nicklockwood / FXForms

[DEPRECATED]
Other
2.93k stars 339 forks source link

Dynamic footer help depending on chosen radio option #454

Open jphorn opened 8 years ago

jphorn commented 8 years ago

Hi,

We want to mimic the behavior as seen in Settings > Photos and Camera > Optimise iPhone Storage / Download and Keep Originals. Depending on the option chosen, the footer text changes with more explanation what which option does.

(sorry, Dutch screenshot)

Does anybody know how we should proceed with this in FXForms?

chris-martin-tessella commented 7 years ago

Set the string for the footer based on the value of the property - the form should load with the correct text for the selected option but won't yet update when you change the selection. Next, in the FormViewController set a key-value observer on the property so that when the value (selected option) changes the form is 'reloaded' (you can use self.formController.form = self.formController.form; to cause the form to update). Changing the option should now redraw the form with the appropriate footer text displayed.

stayallive commented 7 years ago

This is almost a great solution except that it looks like the footer is not working correctly, see #455.