Skip to content
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

NSTimer.new -> NSTimer.init #19

Open
radex opened this issue Feb 29, 2016 · 2 comments
Open

NSTimer.new -> NSTimer.init #19

radex opened this issue Feb 29, 2016 · 2 comments

Comments

@radex
Copy link
Owner

radex commented Feb 29, 2016

Non-scheduling initializers are currently defined as static methods because there was a bug in Foundation causing a crash.

I believe it was fixed, but I don't remember when exactly — it's possible it was only iOS 9/El Capitan, and it still won't work on iOS 8 etc.

If someone could verify this, we could add initializers that are appropriately marked as @available.

PR-s appreciated.

@radex
Copy link
Owner Author

radex commented Apr 10, 2016

Hm, #22 made this hard :( I can't use initializer syntax if using CFRunLoopTimerCreateWithHandler. So either we'll have to wait for factory initializers (there is a Swift Evolution proposal out there), or… back to NSTimerActor? :(

@radex
Copy link
Owner Author

radex commented Apr 10, 2016

Nope, still doesn't work. Not sure why — I'd swear I've seen this work... If someone wants to help, check out this branch: https://github.com/radex/SwiftyTimer/tree/init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant