Delay Function in Swift 3.0

Swift 3.0, Xcode 8 beta
Creating a delayed function

 

 

Since thing have changed a lot for Swift 3.0 , here is a quick tip on how to create a delayed function with the new API.
Add this function to your project:

Then if you want to launch anything after a delay, you use it like so:

That’s all 🙂
Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *