-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift 2.2 Does not work with latest xcode/swift update - selectors is deprecated #23
Comments
Okey I got it working now..
then change select() to
|
There is a pull request to fix this code.. will it be merged? |
Waiting on this merge to implement |
+1 |
Doing a Carthage build doesn't work either - most likely because of this same issue. Waiting to be able to use this framework! |
@kiwo12345 I can't add animate:true to the select, and getting "[DOFavoriteButton.DOFavoriteButton select:]: unrecognized selector sent to instance " |
I get a few warnings saying that the selectors need to change form:
self.addTarget(self, action: "touchDown:", forControlEvents: UIControlEvents.TouchDown)
self.addTarget(self, action: "touchUpInside:", forControlEvents: UIControlEvents.TouchUpInside)
self.addTarget(self, action: "touchDragExit:", forControlEvents: UIControlEvents.TouchDragExit)
self.addTarget(self, action: "touchDragEnter:", forControlEvents: UIControlEvents.TouchDragEnter)
self.addTarget(self, action: "touchCancel:", forControlEvents: UIControlEvents.TouchCancel)
to:
self.addTarget(self, action: #selector(DOFavoriteButton.touchDown(:)), forControlEvents: UIControlEvents.TouchDown)
self.addTarget(self, action: #selector(DOFavoriteButton.touchUpInside(:)), forControlEvents: UIControlEvents.TouchUpInside)
self.addTarget(self, action: #selector(DOFavoriteButton.touchDragExit(:)), forControlEvents: UIControlEvents.TouchDragExit)
self.addTarget(self, action: #selector(DOFavoriteButton.touchDragEnter(:)), forControlEvents: UIControlEvents.TouchDragEnter)
self.addTarget(self, action: #selector(DOFavoriteButton.touchCancel(_:)), forControlEvents: UIControlEvents.TouchCancel)
But updating the selectors will result in my app crashing giving me the error:
libc++abi.dylib: terminating with uncaught exception of type NSException
[Test.DOFavoriteButton select:]: unrecognized selector sent to instance 0x7fea9ad6f480
2016-03-29 23:07:17.286 Test[16889:2397051] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Test.DOFavoriteButton select:]: unrecognized selector sent to instance 0x7fea9ad6f480'
The text was updated successfully, but these errors were encountered: