I have a UIViewController with a UIView as a subview. I’d like the UIViewController to be notified of (or listen for) certain actions in the UIView. What’s the standard way of doing this?
I have a UIViewController with a UIView as a subview. I’d like the UIViewController
Share
If you just want to have an action handler:
For more info, see the
UIControlDocumentation:Or, if your talking about a view controller calling a parent view controller, you could use the
presentingViewControllerproperty of aUIViewControllerto access the “parent” view controller:Or the
superviewproperty of aUIView: