Search code examples
swiftios10xcode8

How to create IBAction in xcode 8 for iOS 10


When i create IBAction in xcode8 using swift. it gives error at run time. Unrecognised Selector sent to UIButton


Solution

  • @IBAction func myFunc(sender: AnyObject)

    becomes

    @IBAction func myFunc(_ sender: AnyObject)