Search code examples
iphoneiosobjective-cuiscrollviewios6.1

How to find the kind of subview object the view is containing in it?


I am trying to find a specific class object added as Subview to a UIView, but I could not find anything.


Solution

  • for(UIView *aView in yourView.subviews){
        if([aView isKindOfClass:[YourClass class]]){
           //YourClass found!!
        }
    }