I have put activity indicator
spinner.center = CGPointMake( [UIScreen mainScreen].bounds.size.width/2,[UIScreen mainScreen].bounds.size.height/2);
[self.view addSubview:spinner];
But this is not properly centered in the table view. Because table view can scroll. How can i put a spinner in the center of the screen.
try with bellow code:-
spinner.center = CGPointMake( [UIScreen mainScreen].bounds.size.width/2,[UIScreen mainScreen].bounds.size.height/2);
yourAppdelegateClass *appDelegate = (yourAppdelegateClass*)[[UIApplication sharedApplication] delegate];
[appDelegate.window addSubview:spinner];
Code Output is:-
Try this:
spinner.center = tableview.center;
Hope it Helps!!
I think you should add your indicater(Spinner) on table view instead of sel.view. and define the area frame on the indicater.
hope this will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With