When I call startAnimating on a UIActivityIndicatorView, it doesn\'t start. Why is this?
[This is a blog-style self-answered question. The solution below works for
If needed, swift 3 version:
func doSomething() { activityIndicator.startAnimating() DispatchQueue.global(qos: .background).async { //do some processing intensive stuff DispatchQueue.main.async { self.activityIndicator.stopAnimating() } } }