The goal is to update the below condition to Swift 2.2 syntax, which advises using #selector or explicitly constructing a Selector
.
if activityViewController.respondsToSelector("popoverPresentationController") {
}
However, using the below as a replacement fails and generates an error saying Argument of #selector cannot refer to a property
if activityViewController.respondsToSelector(#selector(popoverPresentationController)) {
}
What's the right way to implement this check with #selector
?