How can I delay a method call for 1 second?

前端 未结 11 1368
别跟我提以往
别跟我提以往 2020-11-30 18:19

Is there an easy way delay a method call for 1 second?

I have a UIImageView that reacts on a touch event. When the touch is detected, some animations ha

11条回答
  •  抹茶落季
    2020-11-30 18:47

    There are already a lot of answers and they are all correct. In case you want to use the dispatch_after you should be looking for the snippet which is included inside the Code Snippet Library at the right bottom (where you can select the UI elements).

    enter image description here

    So you just need to call this snippet by writing dispatch in code:

    enter image description here

提交回复
热议问题