How do I resolve “ambiguous use of” compile error with Swift #selector syntax?
问题 [ NOTE This question was originally formulated under Swift 2.2. It has been revised for Swift 4, involving two important language changes: the first method parameter external is no longer automatically suppressed, and a selector must be explicitly exposed to Objective-C.] Let\'s say I have these two methods in my class: @objc func test() {} @objc func test(_ sender:AnyObject?) {} Now I want to use Swift 2.2\'s new #selector syntax to make a selector corresponding to the first of these methods