Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var timer : NSTimer?
- func startTimer()
- {
- if timer == nil {
- timer = NSTimer.scheduledTimerWithTimeInterval(timeInterval, target: self, selector: "timerFired", userInfo: nil, repeats: true)
- }
- }
- func stopTimer()
- {
- if timer != nil {
- timer!.invalidate()
- timer = nil
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement