Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift wait until condition is true

//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
Source by www.zerotoappstore.com #
 
PREVIOUS NEXT
Tagged: #swift #wait #condition #true
ADD COMMENT
Topic
Name
7+9 =