Is this possible? For example I have:
pin.image == [UIImage imageNamed: @"Bpin_map"]
but I need to check for Apin_map and more. Is there a way to compare pin.image to a UIImage with a name that ends in _map?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am going to assume you understand already the ins and outs of comparing strings (filenames) and the real problem here is that UIImage does not have a property to contain the filename from which the data was loaded… so:
use objc_setAssociatedObject() to store the name like this:
then you can retrieve the name again using