LoginSignup
6
7

More than 5 years have passed since last update.

Swiftで毎時間ごとに関数を呼び出したい時の方法

Last updated at Posted at 2015-10-05
タイマー処理
    override func viewDidLoad() {
        NSTimer.scheduledTimerWithTimeInterval(1.0, target: self,selector: "onUpdate:", userInfo: nil, repeats: true)
    }

    func onUpdate(timer : NSTimer){
        print("1秒")
    }


6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7