You are using an invalid method signature for an action. You supply buttonClick , but the method has an argument, so the signature should be buttonClick:
button.addTarget(self, action: "buttonClick:", forControlEvents: UIControlEvents.TouchUpInside)
For more information on how to format your selectors, you can refer to the accepted answer in the message below. The code used in this post may be Objective-C, but all of its lessons can also be applied here.
Creating a selector from a method name with parameters
And as a side note, this code would also be valid if you used Selector("buttonClicked:") as an action, but you don't need it because string literals can be implicitly passed to the Selector type.
Quote from Using Swift with Cocoa and Objective-C
The Objective-C selector is a type that references the name of Objective-C. Objective-C's Swift selector presents a selector structure. You can build a selector with a literal string, for example let mySelector: Selector = "tappedButton:". Because string literals can be automatically converted to selectors, you can pass a string literal to any method that accepts a selector.
source share