If you want to save the headers of your methods in your code, you need to change the selector links to #selector(touchDown(sender:)) , etc.
(Generally, you do not need the self. prefix.)
Remember that all functions and methods now have consistent label processing for their first parameters. SE-0046
(You can find many good articles, search with "swift3 selector".)
If you want to save selector links, you need to change the following methods:
func touchDown(_ sender: CustomButton) {
To add, #selector(touchDown) will work if your class has only one touchDown(...) method.
OOPer Sep 15 '16 at 11:29 2016-09-15 11:29
source share