//延时1s执行
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(1*NSEC_PER_SEC))/Double(NSEC_PER_SEC)) {
//code
}
//延时1s执行
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(1*NSEC_PER_SEC))/Double(NSEC_PER_SEC)) {
//code
}
本文标题: Swift3.0 延时执行
本文链接:https://www.haomeiwen.com/subject/hcrfpttx.html
网友评论