LoginSignup
0
1

More than 1 year has passed since last update.

指定した時間後に処理をする

Posted at

今回の内容

  • 指定した秒時間後に処理をさせる

コード

  • 今回は、3秒後に3秒経過とデバックエリアに表示させます。
        print("通信などの処理開始")

        DispatchQueue.main.asyncAfter(deadline: .now() + 3) {

            //tableView.reloadData()など
            print("3秒経過")

        }
デバックエリア
通信などの処理開始処理開始
3秒経過

終わり

ご指摘、ご質問などありましたら、コメントまでお願い致します。

0
1
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
0
1