Quote:
Originally Posted by smasher
Once you create a UIImage from a file you can't check the filename/path. There's no such property on UIImage.
You should store the current image name in your "model" somehow - like saving the string when you set the image - instead of trying to tease it back out of the view.
|
Really? Why would they make you do more work for something so simple??
I could do it the long way as follows:
if (SquareToCheck.currentImage == [UIImage imageNamed:@"Image1.PNG"]) {
MyImageAsString = @"Image1.PNG";
}
But then i'd have to code it for every image. surely there's a way I can just take the name of the image from the buttons currentimage property??