<div class="meta" robots="noindex">

</div>

Class

# iOSToolbar

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `MobileToolbar</api/user_interface/mobile/mobiletoolbar>` as a replacement.

</div>

## Description

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

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                            | Parameters                                                                                                                                                      | Returns                                                               | Shared |
|-------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|--------|
| `Add<iostoolbar.add>`                           | value As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`                                                                                  |                                                                       |        |
| `Count<iostoolbar.count>`                       |                                                                                                                                                                 | `Integer</api/data_types/integer>`                                    |        |
| `Insert<iostoolbar.insert>`                     | index As `Integer</api/data_types/integer>`, value As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`                                     |                                                                       |        |
| `RemoveAll<iostoolbar.removeall>`               |                                                                                                                                                                 |                                                                       |        |
| `RemoveAllByValue<iostoolbar.removeallbyvalue>` | value As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`                                                                                  |                                                                       |        |
| `RemoveByIndex<iostoolbar.removebyindex>`       | index As `Integer</api/data_types/integer>`                                                                                                                     |                                                                       |        |
| `RemoveByValue<iostoolbar.removebyvalue>`       | value As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`                                                                                  |                                                                       |        |
| `Value<iostoolbar.value>`                       | index As `Integer</api/data_types/integer>`                                                                                                                     | `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>` |        |
|                                                 | index As `Integer</api/data_types/integer>`, `Assigns</api/language/assigns>` newValue As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>` |                                                                       |        |

## Method descriptions

<div id="iostoolbar.add">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSToolbar.Add

**Add**(value As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`)

Adds the button to the end of the toolbar.

Add the SystemAdd button to the right Navigation Bar:

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

<div id="iostoolbar.count">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSToolbar.Count

**Count** As `Integer</api/data_types/integer>`

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

Get the count of buttons on an iOSView:

``` xojo
Var buttonCount As Integer = Toolbar.Count
```

<div id="iostoolbar.insert">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSToolbar.Insert

**Insert**(index As `Integer</api/data_types/integer>`, value As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`)

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

Insert a button in the first position of the toolbar:

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

<div id="iostoolbar.removeall">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSToolbar.RemoveAll

**RemoveAll**

Removes all the BarButtons from the bar.

Remove all the buttons from the toolbar:

``` xojo
Toolbar.RemoveAll
```

<div id="iostoolbar.removeallbyvalue">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSToolbar.RemoveAllByValue

**RemoveAllByValue**(value As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`)

Removes all of a specific button from the toolbar.

<div id="iostoolbar.removebyindex">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSToolbar.RemoveByIndex

**RemoveByIndex**(index As `Integer</api/data_types/integer>`)

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

Remove the first button from the toolbar:

``` xojo
Toolbar.RemoveByIndex(0)
```

<div id="iostoolbar.removebyvalue">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSToolbar.RemoveByValue

**RemoveByValue**(value As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`)

Removes a specific button from the toolbar.

Remove the first button from the toolbar:

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

<div id="iostoolbar.value">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSToolbar.Value

**Value**(index As `Integer</api/data_types/integer>`) As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`

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

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="rst-class">

forsearch

</div>

iOSToolbar.Value

**Value**(index As `Integer</api/data_types/integer>`, `Assigns</api/language/assigns>` newValue As `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>`)

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

Get the first button on the toolbar:

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

Change the Caption of the last button on the toolbar:

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

## Notes

Accessed using the LeftNavigationToolbar, RightNavigationToolbar and Toolbar properties of the `MobileScreen</api/user_interface/mobile/mobilescreen>`.

## Compatibility

iOS projects on the iOS operating system.

## See also

`Object</api/data_types/additional_types/object>` parent class; `MobileScreen</api/user_interface/mobile/mobilescreen>`, `MobileToolbarButton</api/user_interface/mobile/mobiletoolbarbutton>` classes
