File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ SwiftyTimer is a set of extensions to make the `NSTimer` API cleaner, nicer to u
44
55Read [ Swifty APIs: NSTimer] ( http://radex.io/swift/nstimer/ ) for more information about this project.
66
7- ### Scheduling a timer
7+ ### Usage
88
99You can easily schedule repeating and non-repeating timers (repeats and delays) using ` NSTimer.every ` and ` NSTimer.after ` :
1010
@@ -46,6 +46,13 @@ let timer = NSTimer.new(every: 1.second) {
4646
4747(This should be defined as an initializer, but [ a bug in Swift] ( http://www.openradar.me/18720947 ) prevents this)
4848
49+ Call ` start() ` to schedule timers created using ` new ` . You can optionally pass the run loop and run loop modes:
50+
51+ ``` swift
52+ timer.start ()
53+ timer.start (modes : NSDefaultRunLoopMode, NSEventTrackingRunLoopMode)
54+ ```
55+
4956### Installation
5057
5158The simplest way to install this library is to copy ` Src/SwiftyTimer.swift ` to your project. There's no step two!
You can’t perform that action at this time.
0 commit comments