In Swift when the button is pressed the App crashes with error
does not implement methodSignatureForSelector: -- trouble ahead Unrecognized selector
In the code a Controller class of mine gets a reference to a UIButton and adds a target like the following
aButton.addTarget(self, action: "pressed:", forControlEvents: UIControlEvents.TouchUpInside)
The function pressed is defined as
func pressed(sender:UIButton)
{
println("button pressed")
}
Controller class is defined like
class MyController
{
init()
{
}
// Also here it gets the reference to the UIButton and has pressed function as well.
}