//延时1s执行
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(*NSEC_PER_SEC))/Double(NSEC_PER_SEC)){
//code
}
原文链接:https://www.f2er.com/swift/322684.html//延时1s执行
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(*NSEC_PER_SEC))/Double(NSEC_PER_SEC)){
//code
}
原文链接:https://www.f2er.com/swift/322684.html