Using Swift for iOS, how would I allow for a UIButton object which I create programmatically to respond to a user action without using Interface Builder?
Hi Shinehah
Once you have instantiated your button, you can call addTarget(_:action:for:) to associate a method in one of your object's that should be called for any of the button's control-events. Typically, touchUpInside is the control event you want to listen for.