IOS Toolbar

I want 3 buttons on the top Navbar and 2 system ones the bottom toolbar, the following works fine but I can’t reference them correctly in the Toolbarpressed event handler.

I tried button.caption but now am a bit confused with the syntax and can’t find the correct caption or button Names.

[code]Dim b As iOSToolButton
b = iOSToolButton.NewPlain(“Clear”) // Add ‘Clear’ button
Self.RightNavigationToolbar.Add(b)

b = iOSToolButton.NewPlain(“Map”) // Add ‘Map’ button
Self.RightNavigationToolbar.Add(b)

b = iOSToolButton.NewSystemItem(iOSToolButton.Types.SystemSave) // Add ‘Save’
Self.LeftNavigationToolbar.Add(b)

b = iOSToolButton.NewSystemItem(iOSToolButton.Types.SystemCamera) // Add Camera icon
Self.Toolbar.Add(b)

b = iOSToolButton.NewSystemItem(iOSToolButton.Types.SystemAdd) // Add button icon
Self.Toolbar.Add(b)[/code]

Hey Martin. I use a combination of the type and, in the case of plain (non-system type) buttons, I set the tag when I create them. So then the code in ToolbarPressed looks like this:

If button <> Nil Then
  Select Case button.Type
  Case iOSToolButton.Types.SystemCancel
    // React to cancel button
    
  Case iosToolButton.Types.SystemAction
    // React to action button
    
  Case iosToolButton.Types.SystemEdit
    // React to edit button
   
  Case iosToolButton.Types.Plain
    Select Case button.tag
    Case "additem"
      // React to plain "additem" button
    End Select

  End Select
End If

Thanks Jason that should do it and hope you are well and staying safe.