As the question correctly says, I need to change the text of 4 different labels without the view being left without being able to process other processes and also between these changes of text I need a delay of at least 1 second.
I already try to do it in an async block but from there I can not modify UI
surely as a precaution measure of race condition
.
Add: For now I have this code but I still can not change sleep and change the title of the button to the second.
func startPings() {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0), {
for boton in self.botones {
//print("Durmió")
dispatch_async(dispatch_get_main_queue(), {
boton.setTitle("<->", forState: .Normal)
})
}
})
}