Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の目標は、ゲームの開始からの経過時間を表示することです(これは継続的に更新する必要があります)。
ゲームの開始から終了までの経過時間を見つける方法を知っています。しかし、ストップウォッチで画面を継続的に更新する方法がわかりません。
でタイマーを開始する
self.updateTimer = [NSTimercheduledTimerWithTimeInterval:1 target:selfセレクター:@selector(現在の時刻を表示するように表示を更新するメソッドを呼び出したものは何でも)userInfo:nil repeats:YES];
ディスプレイが毎秒更新されます