I have a bunch of subViews in my ViewController.
In the last layer I have a UIView, and from this view I want to call superview and go up until I find the UIView that belongs to my ViewController.
Is it possible to find out whether a UIView belongs to a ViewController or not?
UIView *someView = self.superView;
while (true)
{
if (someView BELONGS TO VIEWCONTROLLER)
{
// Now we know this view belongs to a VIewController
break;
}
someView = someView.superView;
}