The class is UILabelused to display text on the screen. Of course, you can detect taps (not clicks) on it, but theres a UIKitclass specifically designed to handle actions on the screen, and that UIButton.
Note. The playground is designed to test logic in your code, not events. If you want to play with specific iOS content, try creating a Single View app project in the iOS section of Xcode 6.
UIButton, , iOS Xcode:
var button = UIButton(frame: CGRect(x: 0, y: 0, width: 150, height: 60))
button.backgroundColor = UIColor.blackColor()
button.layer.cornerRadius = 3.0
button.setTitle("Tap Me", forState: .Normal)
button.addTarget(self, action: "buttonTapped", forControlEvents: .TouchUpInside)
ViewController buttonTapped:
func buttonTapped() {
println("Button tapped!")
}