Displaying overridden configuration
It is useful to display the currently applied overridden configuration in your app. We suggest you display this on your app's home screen.
The provided APLConfigurationLabel
(Swift, Objective-C), APLConfigurationLabel
(Dart) or nz.co.electricbolt.appfiguratelibrary.ConfigurationLabel
(Kotlin or Java) displays overridden configuration drawn in a vertical orientation attached to the left hand side of the screen as follows:
You can add the APLConfigurationLabel
to your view controller in a viewDidLoad
like this:
override func viewDidLoad() {
let label = APLConfigurationLabel(frame: .zero)
label.center = CGPoint(x: 7, y: self.navigationController!.view.bounds.size.height / 2)
self.navigationController!.view.addSubview(label)
}
Creating your own label
If APLConfigurationLabel
is not sufficient for your needs, you can create your own label as follows:
Swift
APLAddConfigurationUpdatedListener
example
extension MyLogonController: APLConfigurationUpdated {
override func viewDidLoad() {
APLAddConfigurationUpdatedListener(self)
}
func configurationUpdated(_ notification: Notification?) {
label.text = APLConfiguration.shared().modifications
}
...
Last updated