class DUXPreflightChecklistManager
@interface DUXPreflightChecklistManager : NSObject <DUXObjectProtocol >
Header: DUXPreflightChecklistManager.h Inherits From: NSObject
Description:
The preflight checklist manager class manages the life-cycle of preflight checklist items, triggers their monitoring activity, and collects their states in order to produce a decision on whether or not it is advisable to take off. It is not a UI object, but can be used to produce a preflight checklist UI.
Class Members:
class method defaultManager
+ (nonnull instancetype )defaultManager
Header: DUXPreflightChecklistManager.h
Description:
This instance will be prepopulated with a default set of checklist items.
Return:
nonnull instancetype The default configured instance.
property preferredCameraIndex
@property (nonatomic , assign ) NSInteger preferredCameraIndex
Header: DUXPreflightChecklistManager.h
Description:
If an item in preflight checklist manager can update it's preferredCameraIndex setting this will update all items to this index. Default value is 0.
protocol DUXPreflightChecklistManagerListener
@protocol DUXPreflightChecklistManagerListener <NSObject >
Header: DUXPreflightChecklistManager.h Inherits From: NSObject
Description:
Defines the communication between the ChecklistManager and the listeners
Protocol Methods:
method preflightChecklistManager:noticedChangesForItem
required - (void )preflightChecklistManager:(nonnull DUXPreflightChecklistManager *)manager noticedChangesForItem:(nonnull DUXPreflightChecklistItem *)item
Header: DUXPreflightChecklistManager.h
Description:
Called when an item changes.
enum DUXPreflightChecklistState
typedef NS_ENUM (NSInteger , DUXPreflightChecklistState)
Header: DUXPreflightChecklistManager.h
Description:
State that each item will report.
Enum Members:
DUXPreflightChecklistSafeStateSafe. DUXPreflightChecklistWarningStateWarning. DUXPreflightChecklistErrorStateError. DUXPreflightChecklistPendingStatePending.
property isReadyToFly
@property (nonatomic ) BOOL isReadyToFly
Header: DUXPreflightChecklistManager.h
Description:
Preflight checklist is ready to fly.
property overallState
@property (nonatomic , readonly ) DUXPreflightChecklistState overallState
Header: DUXPreflightChecklistManager.h
Description:
Aggregated state of all the items.
See Also:
DUXPreflightChecklistState
property preFlightChecklistItems
@property (nonatomic , readonly , nonnull ) NSArray <DUXPreflightChecklistItem *> *preFlightChecklistItems
Header: DUXPreflightChecklistManager.h
Description:
Array of the items in the preflight checklist manager
See Also:
DUXPreflightChecklistItem
method addChecklistItem
- (void )addChecklistItem:(nullable DUXPreflightChecklistItem *)item
Header: DUXPreflightChecklistManager.h
Description:
Add a preflight checklist item to the manager.
method insertChecklistItem:afterChecklistItem
- (void )insertChecklistItem:(nullable DUXPreflightChecklistItem *)itemToInsert afterChecklistItem:(nullable DUXPreflightChecklistItem *)itemToInsertAfter
Header: DUXPreflightChecklistManager.h
Description:
Add a preflight checklist item to the manager after another pre flight checklist item already in the list.
method insertCheckListItem:beforeChecklistItem
- (void )insertCheckListItem:(nullable DUXPreflightChecklistItem *)itemToInsert beforeChecklistItem:(nullable DUXPreflightChecklistItem *)itemToInsertBefore
Header: DUXPreflightChecklistManager.h
Description:
Add a preflight checklist item to the manager before another pre flight checklist item already in the list.
method removeChecklistItem
- (void )removeChecklistItem:(nullable DUXPreflightChecklistItem *)item
Header: DUXPreflightChecklistManager.h
Description:
Remove a preflight checklist item from the manager.
method checkListItemCount
- (NSInteger )checkListItemCount
Header: DUXPreflightChecklistManager.h
Description:
Number of items in the preflight checklist.
Return:
NSInteger The number of items
method checklistItemAtIndex
- (nullable DUXPreflightChecklistItem *)checklistItemAtIndex:(NSInteger )index
Header: DUXPreflightChecklistManager.h
Description:
Returns the preflight checklist item at an index.
NSInteger index Index of desired checklist item.
Return:
method startCheckingList
- (void )startCheckingList
Header: DUXPreflightChecklistManager.h
Description:
When you are ready to show the check list, call this method to start activating the logic of each checklist item.
method stopCheckingList
Header: DUXPreflightChecklistManager.h
Description:
When you are done with the checklist don't forget to call stopCheckingList.
method item:didChangeState:didChangeDescription
- (void )item:(nonnull DUXPreflightChecklistItem *)item didChangeState:(BOOL )didChangeState didChangeDescription:(BOOL )didChangeDescription
Header: DUXPreflightChecklistManager.h
Description:
Method that responds to changes in an item.
nonnull DUXPreflightChecklistItem * item The item that changed. BOOL didChangeState Whether the item state changed. BOOL didChangeDescription Whether the item description changed.
method addListener
- (void )addListener:(nullable id <DUXPreflightChecklistManagerListener>)listener
Header: DUXPreflightChecklistManager.h
Description:
Adds a listener.
method removeListener
- (void )removeListener:(nullable id <DUXPreflightChecklistManagerListener>)listener
Header: DUXPreflightChecklistManager.h
Description:
Removes a listener.