How can I delay a method call for 1 second?

前端 未结 11 1388
别跟我提以往
别跟我提以往 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:43

    You can use the perform selector for after the 0.1 sec delay method is call for that following code to do this.

    [self performSelector:@selector(InsertView)  withObject:nil afterDelay:0.1]; 
    

提交回复
热议问题