The code completion fills in the name of the method inside the #selector(
then proceeds to crash at runtime with an error that the selector is unrecognized, (IllegalArgumentException).
What was the point of redoing the selector syntax as no longer just strings??
Here is the creation of the selector:
headerAddButton.addTarget(section, action: #selector(addActivityToSpecificDay(sender:)), for: .touchDown)
Section (referenced here) is the header section of the tableview (forgot to mention, this code was working before Xcode 9):
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
Here is the method signature of the handler:
@objc func addActivityToSpecificDay (sender :UIButton)
In the same source file of course. But read the question: if the code completion can find it how on earth do I get a runtime crash?