Get to UIViewController from UIView?
Using the example posted by Brock, I modified it so that it is a category of UIView instead UIViewController and made it recursive so that any subview can (hopefully) find the parent UIViewController. @interface UIView (FindUIViewController) – (UIViewController *) firstAvailableUIViewController; @end @implementation UIView (FindUIViewController) – (UIViewController *) firstAvailableUIViewController { UIResponder *responder = [self nextResponder]; while … Read more