iOS Question BitmapDrawable object IOS ?

Discussion in 'iOS Questions' started by little3399, Jun 21, 2015.

  1. little3399

    little3399 Active Member Licensed User

    HI,

    Is there BitmapDrawable object on IOS or the equivalent objects ? Tks
     
  2. Filippo

    Filippo Expert Licensed User

    Yes, something similar to:
    Code:
    Public Sub SetBackgroundImage(btn As Button, imbEnabled As String, imbDisabled As String)
        BackgroundImage(btn, 
    LoadBitmap(File.DirAssets, imbEnabled), 0)
        BackgroundImage(btn, 
    LoadBitmap(File.DirAssets, imbDisabled), 2)
    End Sub

    'Change background image
    'state: 0 - normal, 1 - highlighted, 2 - disabled
    Private Sub BackgroundImage(b As Button, bmp As Bitmap, state As Int)
        
    Dim no As NativeObject = b
        no.RunMethod(
    "setBackgroundImage:forState:"Array(bmp, state))
    End Sub
     
Loading...