LoginSignup
24
21

More than 5 years have passed since last update.

dispatch_afterを利用してスレッド遅延

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
    // 処理内容
});

セレクタを指定して実行

[self performSelector:@selector(selector) withObject:nil afterDelay:1.0f];

おまけ

スリープ
[NSThread sleepForTimeInterval:1.0f];
24
21
1

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
24
21