I need a way to get all UILabel
s within a UIView
without having to go through all the views within the UIView
.
I have many other type of views, UIButton
s, UIImageView
s and it would be too long to go through all of them when I just need the UILabel
s.
I'm trying to avoid something like this:
for (UIView *view in myView.subviews)
{
if([view isKindOfClass:[UILabel class]])
{
UILabel *lbl = (UILabel*)view;
}
}
Is it possible or am I dreaming?