Put an image into an iosbutton

Hi there…
Is possible to have an iosbutton with an image instead the text?

Many thanks…

Yes, it’s possible with a declare:

Declare sub setImage lib "UIKit" selector "setImage:forState:" (obj_id as ptr, img as ptr, state as integer) SetImage(mybutton.handle, myimage.handle, state)
I don’t know the values for state off the top of my head but you can find them in iOSKit (in the UIStepper control of Extensions) or in an iOS playground in Xcode. Something like this:

Import UIKit Var state = UIControlState.Normal.rawValue //etc Print(state)

… and if you’re not that much into declares, iOSLib has a button extension that extends the iOSButton features without subclassing it:

https://github.com/UBogun/Xojo-iosLib

[quote=198457:@Sergio Tamborini]Hi there…
Is possible to have an iosbutton with an image instead the text?

Many thanks…[/quote]

You can use a Canvas as well with Keydown…

sigh… another case where you have to use bailing-wire and chewing gum

Duck tape ?