I created UITableViewControllerin my storyboard and then dragged the activity indicator view onto the controller (along with creating an output for it), from which I start and stop the animation before and after loading some json content.
I see that the ajax spinner is working fine, but it visually appears under my navigation area / name, and when I try to center it, it seems centered in width, appears at the very top near the status area ...
I tried to do the following, trying to focus it ... Here's a quick look at mine viewDidLoad:
- (void)viewDidLoad
{
[super viewDidLoad];
self.listLoader.center = CGPointMake( [UIScreen mainScreen].bounds.size.width/2,[UIScreen mainScreen].bounds.size.height/2);
UITableView *appDelegate = (UITableView *)[[UIApplication sharedApplication] delegate];
[appDelegate.window addSubview:self.listLoader];
self.operationQueue = [NSOperationQueue new];
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(getPosts) object:nil];
[self.operationQueue addOperation:operation];
}
, startAnimating stopAnimating getPosts . , , , . , ...
self.listLoader.center = CGPointMake( [UIScreen mainScreen].bounds.size.width/2,[UIScreen mainScreen].bounds.size.height/2);
UITableView *appDelegate = (UITableView *)[[UIApplication sharedApplication] delegate];
[appDelegate.window addSubview:self.listLoader];
...
? , , , , ....