Class

iOSToolbar


Warning

This item was deprecated in version 2020r2. Please use MobileToolbar as a replacement.

Description

A toolbar can be displayed in a view as a Toolbar or Navigation Bar.

Method descriptions


iOSToolbar.Add

Add(value As MobileToolbarButton)

Adds the button to the end of the toolbar.

Add the SystemAdd button to the right Navigation Bar:

RightNavigationToolbar.Add(iOSToolButton.NewSystemItem(iOSToolButton.Types.SystemAdd))

iOSToolbar.Count

Count As Integer

The number of buttons on the toolbar. If Count = 0 then no toolbar is displayed.

Get the count of buttons on an iOSView:

Var buttonCount As Integer = Toolbar.Count

iOSToolbar.Insert

Insert(index As Integer, value As MobileToolbarButton)

Inserts the BarButton at the specified index (0-based) on the bar.

Insert a button in the first position of the toolbar:

Toolbar.Insert(0, iOSToolButton.NewPlain("Save"))

iOSToolbar.RemoveAll

RemoveAll

Removes all the BarButtons from the bar.

Remove all the buttons from the toolbar:

Toolbar.RemoveAll

iOSToolbar.RemoveAllByValue

RemoveAllByValue(value As MobileToolbarButton)

Removes all of a specific button from the toolbar.


iOSToolbar.RemoveByIndex

RemoveByIndex(index As Integer)

Removes the button at the specified index (0-based) from the toolbar.

Remove the first button from the toolbar:

Toolbar.RemoveByIndex(0)

iOSToolbar.RemoveByValue

RemoveByValue(value As MobileToolbarButton)

Removes a specific button from the toolbar.

Remove the first button from the toolbar:

Var removeButton As iOSToolButton
removeButton = Toolbar.Value(0)
Toolbar.RemoveByValue(removeButton)

iOSToolbar.Value

Value(index As Integer) As MobileToolbarButton

Sets the button at the specified index (0-based) on the toolbar.


iOSToolbar.Value

Value(index As Integer, Assigns newValue As MobileToolbarButton)

Sets the button at the specified index (0-based) on the toolbar.

Get the first button on the toolbar:

Var button As iOSToolButton
button = Toolbar.Value(0)

Change the Caption of the last button on the toolbar:

Toolbar.Value(Toolbar.Count - 1).Caption = "New"

Notes

Accessed using the LeftNavigationToolbar, RightNavigationToolbar and Toolbar properties of the MobileScreen.

Compatibility

iOS projects on the iOS operating system.

See also

Object parent class; MobileScreen, MobileToolbarButton classes