swift , NSTimer, call function every 1 second

February 23, 2015   ·   0 Comments

Screen Shot 2015-02-22 at 5.31.27 PM

[/php]
class GameScene: SKScene {
override func didMoveToView(view: SKView) {
var timer = NSTimer()
  timer = NSTimer.scheduledTimerWithTimeInterval(1, target:self,
selector: Selector(“updateCounter”), userInfo: nil, repeats: true)
 }
func updateCounter() {
print(“get it”)
}

}
[/php]
call function every 1 second

shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
Swift491

Swift

Amazon

adsbygoogle

Recent Posts

Categories

Amazon