I want to get a label’s attributes from self so I tried:
UILabel *label = (UILabel *)[self viewWithTag:1];
But all I got was an empty UILabel instead of the label I was looking for. What is correct way to do this.
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.
So I figured out what I was doing wrong. Obviously
creates a pointer to the instance of my label with tag 1. This does actually work. What doesn’t work and why I was having problems came from trying to release label. Releasing label is the same as release [self viewWithTag:1] which is not what I was trying to do.