Changing Toolbar button Type

I am trying to change the button type between play and pause using the following that autocompletes ok but it says it doesn’t exist. what is the correct syntax?

PauseBtn.Type = iOSToolButton.Types.SystemPlay

or do I have to try and remove and insert

This is the best I could come up with which works but not sure if there is something more streamlined

Var removeButton As iOSToolButton
removeButton = Toolbar.Value(2)

self.Toolbar.Insert(2, iOSToolButton.NewSystemItem(iOSToolButton.Types.SystemPlay))

In the underlying control, you can only set this value when creating a new one, so it’s logical to assume that it can’t be changed at runtime. Removing and re-adding seems to be the only option.

On Apple’s site, search for initWithBarButtonSystemItem

1 Like

Thanks Greg