I have subclassed a UIView. I am adding it as a subview of a UIViewController view. I have a button in the UIView. What I want is to handle the button click inside my UIViewController, where I will remove the UIView from superview and push another UIViewController. How can I do this.
I have subclassed a UIView . I am adding it as a subview of
Share
You must attach the target with your UIButton. addTarget method is used for getting the event when you click on button and defined in
UIControlclass which is direct super class ofUIButtonCode to receive the event for Button touch.
Implementation for the action.