Reputation: 521
Say I had a function, any function, that I wanted to run for only three seconds and then never run again. How would I do this? Would I use NSTimer? Thank you for your help.
Upvotes: 0
Views: 100
Reputation: 31311
Here you go,
NSTimer.scheduledTimerWithTimeInterval(3, target: self, selector: Selector("updateProgress:"), userInfo: nil, repeats: false)
func updateProgress(timer: NSTimer){
}
Upvotes: 1