Comments (7)
@efremidze Hey, I'm not against this, but I don't want the passed timer object to be required. Often times, I really don't care about it, because I'm going to assign it to a property anyway.
Take a look at #8. Last time someone took a look at it, there was no way to have both without errors about ambiguity.
But that was a while ago. If you can make both:
NSTimer.every(5.seconds) {
// whatever
}
and
NSTimer.every(5.seconds) { timer in
// whatever
}
work, I'd accept such a PR in an instant.
from swiftytimer.
Thats currently a limitation in Swift. Lets wait until Swift 3. 😃
from swiftytimer.
You could help by filing a bug on bugs.swift.org :)
from swiftytimer.
good idea 👍
from swiftytimer.
I'll keep it open in case someone is looking for this ;)
from swiftytimer.
Added on master. Unfortunately if you want the timer passed in, you have to say { (timer: NSTimer} in ... }
, but hey, it works!
from swiftytimer.
thanks 👍
from swiftytimer.
Related Issues (20)
- Use default arguments naming HOT 2
- How to stop started timer ? HOT 4
- NSTimer.new -> NSTimer.init HOT 2
- Add Swift Package Manager support HOT 4
- Convert separate test project into a XCTest-based test target HOT 5
- Add Travis CI HOT 2
- Support lower deployment targets than 10.11 HOT 2
- How to stop a timer in this timer's closure? HOT 4
- userinfo ? HOT 5
- SwiftyTimer is not compatible with Swift 3.0 HOT 1
- Crash when calling fire() after creating timer HOT 10
- Swift 2.3 compile error HOT 4
- Publish swift 3 code to cocoapods HOT 2
- Usage issue HOT 3
- is it supposed to work on a background queue? HOT 2
- Can't figure out how to stop timer
- Timer not working in background
- Swift 4.0 HOT 3
- Swift 5 support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftytimer.