iOS Question Geting bitmap of imageview

Discussion in 'iOS Questions' started by tufanv, Jul 4, 2015.

  1. tufanv

    tufanv Expert Licensed User

    Hello,

    I am using several imageviews in my app. I have a problem.i set imageview1 's bitmap as :

    imageview1.bitmap = LoadBitmap(File.DirAssets, "gri.png" )

    when i try to get the bitmap with log(imageview1.bitmap) i get something like :
    <B4IBitmap: <UIImage: 0x17ec86b0>, {100, 100}>

    what i try to make is i want to check if imageview1.bitmap = gri.png then do something but i cant do it .

    Any ideas ? Thank you
     
  2. strat

    strat Active Member Licensed User

    Tufan bu kısım genel forum olduğundan ingilizce yazıyorum. Sadece bir fikir.

    Use an array like
    Code:
    Dim imagenames(50As String
    Assign imagenames to array :
    Code:
    imagenames(1)="gri.png"
    imagenames(
    2)="red.png"
    ....
    To check imagename to any picture use this :
    Code:
    If imagenames(1)="gri.png" Then
    imagename(1) cheks for name of imageview1.bitmap, imagenames(2) checks for imageview2.bitmap etc.
     
  3. imbault

    imbault Well-Known Member Licensed User

    You can put your image file name in ImageView.tag then use the tag property to check your file name, like :

    Code:
    imageview1.Bitmap = LoadBitmap(File.DirAssets, "gri.png" )
    imageview1.Tag = 
    "gri.png"

    log(imageview1.Tag )
     
  4. tufanv

    tufanv Expert Licensed User

    Hocam tesekkur ederim:)
     
  5. tufanv

    tufanv Expert Licensed User

    Thank you
     
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