FUIToolbar
@MainActor
open class FUIToolbar : UIToolbar
FUIToolbar is a subclass of ‘UIToolbar’ which displays the UIBarButtonItem array in Fiori style.
Developers needs to create UINavigationController with the following code to use FUIToolbar as its toolbar.
UINavigationController(navigationBarClass: nil, toolbarClass: FUIToolbar.self)
Then in the viewDidLoad function of the UIViewController use the following code to set the toolbar items for text buttons:
var buttons: [FUIButton] = [...]
setFioriStyleToolbarItems(buttons, helperText: helperText, animated: true)
Or, for icon type items:
let item1 = UIBarButtonItem(image: shareIcon, ...) // item1 is the primary item
let item2 = UIBarButtonItem(image: trashIcon, ...)
var items: [UIBarButtonItem] = [item1, item2, ...]
setFioriStyleToolbarItems(items, helperText: helperText, animated: true)
Theming
Supported TEXT class paths:
fdlFUIToolbar_helperText {}
Supported TEXT properties:
font-color: Color;
font-style: UIFontTextStyle;
Supported UIBarButtonItem class path:
fdlFUIToolbar_overflowButton {}
Supported UIBarButtonItem properties:
image: Name;
-
The custom color for helper text.
The default is
nil: the default Fiori color will be used.Declaration
Swift
@MainActor open var helperTextColor: UIColor? { get set } -
The custom font for helper text.
The default is
nil: the default Fiori font will be used.Declaration
Swift
@MainActor open var helperTextFont: UIFont? { get set } -
The custom image for the overflow button.
The default is
nil: the default image will be used.Note that due to the limitations of the
UIBarButtonItemimageproperty, this property needs to be set before the items are set using thesetFioriStyleToolbarItemsAPI.Declaration
Swift
@MainActor open var overflowButtonImage: UIImage? -
This property indicates whether the two buttons are edge-aligned when the helper text is not empty, regardless of the type of buttons.
The default is
false, meaning that edge-aligned is only for two tertiary buttons with helper text.Declaration
Swift
@MainActor open var alwaysEdgeAlignedForTwoButtons: Bool -
The maximum number of buttons to be displayed in the toolbar when all the buttons are
UIButtontype.An overflow button will be added to the toolbar if the number of buttons provided by the developer is greater than the value of this property. And the rest of the buttons will be displayed in an action sheet when the overflow button is tapped.
Declaration
Swift
@MainActor public var maximumButtonsCountInBar: Int { get }
-
Undocumented
Declaration
Swift
@MainActor open override var accessibilityElements: [Any]? { get set }