Attendez rapidement que l'état soit vrai

//You can use a Timer
//You have to import Foundation first though

let timer = Timer.scheduledTimer(withTimeInterval: 5.0, repeats: false) { (timer) in
    //Code to run
}

//This makes it so that the code inside of the timer runs 5 seconds after loading, and it does not repeat
//More examples to be found at source, this is just one that I sort of prefer
lmaocoder