Add UIActivityIndicatorView into UIBarButton
If you’re trying to show the activity wheel in a navigation bar button (e.g. you might have a refresh button on your navbar) – you can create a new UIBarButtonItem with a custom view being the UIActivityIndicatorView: Objective-C uiBusy = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; uiBusy.hidesWhenStopped = YES; [uiBusy startAnimating]; [self.navigationItem.rightBarButtonItem initWithCustomView:uiBusy]; Swift let uiBusy = UIActivityIndicatorView(activityIndicatorStyle: … Read more