Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Binju

macrumors member
Original poster
Jan 31, 2010
65
0
I used the below code for checking the image in the imageview

Code:
if(imageview2.image == [UIImage imageNamed:@"9.png"])
	{
//Do

}

But it did not check the correct image.
 

kaydell.leavitt

macrumors regular
Apr 19, 2010
100
0
== 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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.