-
Notifications
You must be signed in to change notification settings - Fork 13
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
Timers not work #3
Comments
They are supposed to be scheduledTimers, at least as of Swift 3. I would replace the Timer lines to match this:
|
…dcity#3. Updated project settings.
I am no expert in Swift but ... I assigned the result to a global "timer" of type NSTimer. All I can say is: it worked for me. The construct " _ = " confuses me with regard to whether an object was created and who owns it and when it might be garbage collected. Especially with regard to a timer object: I imagine it means that that timer will exist, owned by the OS, will fire and then go out of existence? But again, seems a little unnatural to me. |
Yes, it is odd to see it assigned to a "_". With Swift timers, one should call Edit: actually since I have made it a "scheduledTimer" that doesn't repeat, it automatically deallocates itself once it is fired. |
The pauseScan and resumeScan timers never fire. At least they never print. Xcode 7.3.1, iOS 9.3.5
The text was updated successfully, but these errors were encountered: