I have a pointer to a UIView
. How do I access its UIViewController
? [self superview]
is another UIView
, but not the
I think you can propagate the tap to the view controller and let it handle it. This is more acceptable approach. As for accessing a view controller from its view, you should maintain a reference to a view controller, since there is no another way. See this thread, it might help: Accessing view controller from a view