UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 14, 14)];
[activityView sizeToFit];
[activityView setAutoresizingMask:(UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin)];
activityView.hidesWhenStopped = NO;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:activityView];
[activityView startAnimating];
What is the reason the uiactivity indicator is not being shown in the top right corner? Nothing is displayed in the top right nav bar.
Because you not assign the color of Activity Indicator assign the color then i will show in navigation bar
activityView.color = [UIColor blackColor];