How can I delay a method call for 1 second?

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

    You can do this

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

提交回复
热议问题