-
Notifications
You must be signed in to change notification settings - Fork 15
SmartModel
The Smart Model is a separate model encapsulating the display business logic for a Smart List. The Model class contains the business logic for what to display in a given list while the Smart List is a meta-level model that can adjust the presentation items in a model.
The base class for SmartModels is DUXBetaSmartListModel
and can be subclassed for other Smart Models.
And example of this is the System Status List Widget. That widget displays relevant system status line items appropriate for the connected aircraft. Not all items are appropriate for all aircraft. So the Smart Model used in the System Status List Widget observes what is connected, and then builds a list of widgets for presentation by the System Status List Widget. The System Status List Widget Model is then tasked with managing the specific list of widgets for the currently connected aircraft.
To create a custom Smart Model, override the method
func buildModelLists()
- (void)buildModelLists;
Internally this method fills in the instance array called modelClassnameList
with the class names of the widgets to be created for Smart List.
DJI UX SDK Version 5 Beta 4.1