UIButton remove all target-actions

Call removeTarget:action:forControlEvents:, pass nil for the target, NULL for action, and use a control mask that sets all bits (UIControlEventAllEvents).

Objective-C

[someControl removeTarget:nil 
                   action:NULL 
         forControlEvents:UIControlEventAllEvents];

Swift 2

button.removeTarget(nil, action: nil, forControlEvents: .AllEvents)

Swift 3 or higher

button.removeTarget(nil, action: nil, for: .allEvents)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)