Why does it take such a long time for UI to be updated from background thread?
问题 I understand that all UI updates must be done from Main thread. But purely for the sake of deeper understanding how GCD and dispatch main work: I have a button that runs a network call and in its completionHandler I eventually do: self.layer.borderColor = UIColor(red: 255/255.0, green: 59/255.0, blue: 48/255.0, alpha: 1.0).cgColor self.layer.borderWidth = 3.0 For the color change to happen it takes 6-7 seconds. Obviously if run the above code from main thread it would change the border color