日々精進

新しく学んだことを書き留めていきます

2012-06-12から1日間の記事一覧

NSTimerで定期的に実行する

一定間隔で何度か処理を実行させたい場合、以下のようにする。 >|objc|NSTimer *tUpdate; NSTimeInterval tiCallRate = 1.0 / 15.0; tUpdate = [NSTimer scheduledTimerWithTimeInterval:tiCallRate target:self selector:@selector(updateScore:) userInfo:…