Last active
October 5, 2017 06:08
-
-
Save pgpt10/5ce5fa81a23f68d37da7a691b16a231e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func viewDidLoad() | |
{ | |
super.viewDidLoad() | |
let button = UIButton(frame: CGRect(x: 0, y: 0, width: 50, height: 50)) | |
button.addTarget(self, action: #selector(buttonClick), for: .touchUpInside) | |
} | |
@objc func buttonClick() //Add @objc in method definition | |
{ | |
//Some code here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment