I have a view controller that starts an asynchronous network request when the user clicks a button, and then pops another controller after the request is complete. At this intermediate time, I want the activity indicator to be displayed on the navigation bar, so the user knows that he is retrieving data. I have this code in IBAction for a button:
self.activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle: UIActivityIndicatorViewStyleWhite];
The indicator does not appear, but this code is called. I looked at other posts on this topic, and they say, to do just that. The user interface thread is not displayed during a call (I can press other buttons and go to another path while waiting). Did I miss something?
source share