|A general-purpose radio group. More...|
|The delegate for NIRadioGroup. More...|
|A controller that displays the set of options in a radio group. More...|
|The NITableViewActions class provides an interface for attaching actions to objects in a NITableViewModel. More...|
Model tools are objects that abstract common functionality used in view controllers.
One commonly-required feature for table views is radio button functionality. This is useful when you need the user to make a choice from a set of options. Implementing this is trivial with the Nimbus NIRadioGroup object.
The radio group object allows you to map a set of table objects to a group of identifiers and then support radio button interactions. You can find a working example of this in the ModelCatalog sample application.
Provided below is a quick overview of implementing the iOS Settings app's notifications page.
Separating actions from presentation is an important aspect in simplifying table view cell design. It can be tempting to add delegate and selector properties to cells, but this ends up forcing a lot of logic to be written on the cell level so that the cells accurately represent their actionable state.
Nimbus provides a solution with NITableViewActions. NITableViewActions manages the cell <=> action mapping by inserting itself in the delegate call chain invocation forwarding. When cells are displayed, their accessoryType and selectionStyle are updated to reflect the actions that have been attached to them. When cells are tapped, the correct set of actions are performed.
Below is an example of implementing the "General" page of the Settings app.