From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As iOSImage )
aiOSSegmentedControlItem.Icon = newiOSImageValue
iOSImageValue = aiOSSegmentedControlItem.Icon

Supported on Mobile (iOS).

The icon to display.


Although you can have both an Icon and a Title, iOS only shows one of them, preferring the icon if available.

If you use an icon that is too large (about 28x28 seems to be the maximum), you will only see an empty square.

Only the mask for the icon is used, displayed using the tint color for iOS (currently blue), so be sure to use a PNG with an alpha channel.

Sample Code

Changes the icon for the first segment:

MySegmentedControl.Item(0).Icon = MyNewIcon