Remove the UIButton target's in swift or objective C

Solution:

Use the below code to remove the targets for an UIButton.

Objective C:


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



Swift 2:

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


Swift 3:

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

Comments

  1. If you're looking to lose pounds then you have to start using this brand new tailor-made keto meal plan diet.

    To create this keto diet service, certified nutritionists, fitness couches, and chefs united to develop keto meal plans that are useful, painless, economically-efficient, and fun.

    Since their first launch in early 2019, hundreds of people have already completely transformed their figure and well-being with the benefits a proper keto meal plan diet can give.

    Speaking of benefits; in this link, you'll discover eight scientifically-certified ones offered by the keto meal plan diet.

    ReplyDelete

Post a Comment

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift