-
Notifications
You must be signed in to change notification settings - Fork 15
Top Bar Panel Widget
The TopBarWidget is a specialized subclass of Bar Panel Widget configured to work in an horizontal orientation. It is provided to display the standard list of status bar widgets. The top bar panel widget provides an option to organize its child widgets into left side widgets and right side widgets.
The top bar panel widget contains:
- Flight Mode Widget
- Simulator Indicator Widget
- AirSense Widget
- GPS Signal Widget
- Vision Widget
- Remote Controller Signal Widget
- Video Signal Widget
- Battery Widget
- Connection Widget
The top bar panel is seen as below:
Disconnected State
Connected State
This is a good example of how you can create a self contained bar panel widget. The widget adds its own widget list in the subclass implementation of viewDidLoad
. The next step is to specify the configuration of the widget in defaultConfigurationSetup
as follows:
public override func defaultConfigurationSetup() {
let config = DUXBetaPanelWidgetConfiguration(type:.bar, variant:.horizontal)
let _ = configure(config)
}
- (void)defaultConfigurationSetup {
DUXBetaPanelWidgetConfiguration *configuration = [[DUXBetaPanelWidgetConfiguration alloc] initWithType:DUXBetaPanelTypeBar variant:DUXBetaPanelVariantHorizontal];
[self configure:configuration];
}
In order to instantiate and use this widget, do the following:
let topBarWidget = DUXBetaTopBarWidget()
topBarWidget.install(in: self)
DUXBetaTopBarWidget *topBarWidget = [[DUXBetaTopBarWidget alloc] init];
[topBarWidget installInViewController:self];
The widget supports all the customizations that its parent Bar Panel Widget supports. Individual elements of the panel can also be customized using the properties exposed by the top bar panel.
List of the customization APIs
-
let systemStatusWidget: DUXBetaSystemStatusWidget
- Instance of System Status Widget. -
let flightModeWidget: DUXBetaFlightModeWidget
- Instance of Flight Mode Widget. -
let simulatorIndicatorWidget: DUXBetaSimulatorIndicatorWidget
- Instance of Simulator Indicator Widget. -
let airSenseWidget: DUXBetaAirSenseWidget
- Instance of AirSense Widget. -
let gpsSignalWidget: DUXBetaGPSSignalWidget
- Instance of GPS Signal Widget. -
let visionWidget: DUXBetaVisionWidget
- Instance of Vision Widget. -
let remoteControllerSignalWidget: DUXBetaRemoteControllerSignalWidget
- Instance of Remote Controller Signal Widget. -
let videoSignalWidget: DUXBetaVideoSignalWidget
- Instance of Video Signal Widget. -
let batteryWidget: DUXBetaBatteryWidget
- Instance of Battery Widget. -
let connectionWidget: DUXBetaConnectionWidget
- Instance of Connection Widget.
DJI UX SDK Version 5 Beta 4.1