Is it possible to assign a text tag to any UIObject? If not is there another way I can do it? Can I do for example:
image.tag = [NSString stringWithFormat: @"Hello"];
Thanks for any help!
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.
No, the tag is an integer.
Consider subclassing
UIImageViewclass and just adding aNSStringproperty. It is really simple these days.Example:
Then just use
TaggedImageViewin place ofUIImageView.If you only access the
MyImageViewfrom one .m file you can just put these lines just after the#importstatements.