One of my favourite changes in Swift 2.2 is that Objective-C selectors now are first class citizens in the Swift ecosystem. So long to error-prone selector names as Strings.

Swift 2.2 lets you use the #selector expression to reference a selector from your Swift code.

class MyView: UIView {  
    private lazy var button: UIButton = {
        let b = UIButton()

        // Swift 2.1 and earlier
        b.addTarget(
            self,
            action: "buttonTapped:",
            forControlEvents: .TouchUpInside
        )

        // Swift 2.2
        b.addTarget(
            self,
            action: #selector(MyView.buttonTapped(_:)),
            forControlEvents: .TouchUpInside
        )
        return b
    }()

    func buttonTapped(sender: UIButton) {
        // ...
    }
}

My only complain about this is that the actions still need to be declared either internal or public, declaring the action as private returns the error Argument of '#selector' refers to a method that is not exposed to Objective-C, which makes sense if yout think about it.

EDIT: I should have read the error message more carefully.

Turns out that if you want your selector to be private, you only need to add the @objc attribute to the function declaration, and you're set:

extension Selector {  
    static let cancelButtonTapped = #selector(MyView.cancelButtonTapped)
}

class MyView: UIView {  
    @objc fileprivate func cancelButtonTapped() {
        // ...    
    }
}

EDIT: In Swift 3.0, the function needs to be set to fileprivate in order to be available from outside its scope.