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...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice