views:

77

answers:

2

I have a UITableView that I am placing inside a TabView. I am trying to put a "spinner" and a label in the center of the TableView. When I view I try to view it inside the TabBar, I do not see the spinner or label. When I view this nib by itself, I see the spinner and TabBar.

There seems to be something about views / tabbars that I am not getting...

A: 

if you are putting Label On the UITableView than chances are there that TableView will be overlapped on your label and spinner...

mihirpmehta
A: 

Instead of adding the UILabel and UIActivity indicator on the tableview in the nib, I suggest you add them to the view containing the tableview by adding them in viewDidLoad or an appropriate method of your view controller. e.g.

UIActivityIndicator activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
[activityIndicator setCenter:CGPointMake(160,200)];
[self.view addSubview:activityIndicator]; 

Similarly you can add the label and position it in the view.

You can then add

[activityIndicator startAnimating]; 

and

[activityIndicator stopAnimating];

wherever you want the spinner to start or stop animating. I am not sure what you want to do with the label. If its to display a loading message, you can make the label hidden or visible as appropriate.

Hetal Vora
Thanks. I'll have to play with the threads a bit, but this is working.
Chris