Here's the line of code:
viewWithTag: returns a UIView. Assuming my code works properly, it should return, more specifically, a UILabel. I need to specify that it's a UILabel here, because otherwise later on when I ask for the text property it says that UIViews don't have a text property.
So, what suggestions are there for removing the warning? What's the best programming practice in a case like this? Make an all new subclass of UIView that returns a UILabel when it's asked for a labelWithTag: or something like that? (Seems silly given the existing class does nearly exactly what I want.)
Thanks for any help.
Code:
UILabel *scoreLabelToAdd = [itemView viewWithTag:([[foundItemArray objectAtIndex:2] intValue] + 10)];
viewWithTag: returns a UIView. Assuming my code works properly, it should return, more specifically, a UILabel. I need to specify that it's a UILabel here, because otherwise later on when I ask for the text property it says that UIViews don't have a text property.
So, what suggestions are there for removing the warning? What's the best programming practice in a case like this? Make an all new subclass of UIView that returns a UILabel when it's asked for a labelWithTag: or something like that? (Seems silly given the existing class does nearly exactly what I want.)
Thanks for any help.