How to find the only UILabel in a view and hide it?

Posted by tarnfeld on Stack Overflow See other posts from Stack Overflow or by tarnfeld
Published on 2010-04-22T18:14:33Z Indexed on 2010/04/22 18:23 UTC
Read the original article Hit count: 232

Filed under:
|
|

I am adding a UILabel as a subview to a UIView and sometime later I want to hide it. It is assigned to a variable but I don't think setting the variables property Hidden after it's been added to the view will work (well it doesn't seem to anyway).

Is there a way to loop through the subviews in a view and then find the one that has a specific tag or is of type UILabel that I could then remove?

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about uilabel