Get imagename from imageview

Discussion in 'iOS Programming' started by Binju, Apr 27, 2010.

  1. Binju macrumors member

    Jan 31, 2010
    I used the below code for checking the image in the imageview

    if(imageview2.image == [UIImage imageNamed:@"9.png"])
    But it did not check the correct image.
  2. kaydell.leavitt macrumors regular

    Apr 19, 2010
    == or isEqualTo:

    Do you know that when you use the operator: == that the object-pointer has to be the exact same pointer.

    Maybe, you need to use the method: isEqualTo to check that the images are equivalent (though not necessarily the same exact object).

    -- Kaydell

Share This Page