How can I specify load activity in a UITableView on iOS 7?

I know that I can use SVProgressHUDat any time when I need to show the user that something is loading in full screen.

However, is there a regular way to show an activity indicator or a spinner inside UITableViewin iOS 7 design guides? I find SVProgressHUD just plain ugly in iOS 7 and I thought there should be a better solution.

What is Apple's way of doing this?

+4
source share
2 answers

The apple way to do this is to show an activity indicator on top of the table view.

You can check the Native Mail app to work.

Mail app

-

UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
[refreshControl addTarget:self action:@selector(handleRefresh:) forControlEvents:UIControlEventValueChanged];
self.refreshControl = refreshControl;

/ .

- beginRefreshing - endRefreshing

+2

, :

table backgroundView, , , .

  • UIViewController , . : UIActivityIndicatorView UILabel , .
  • .
  • viewDidLoad , . , , .

    self.tableView.backgroundView = ((UIViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"yourStoryboardID"]).view;
    self.tableView.backgroundColor = [UIColor whiteColor];
    
  • , , :

    self.tableView.backgroundView.hidden = YES;
    

, .

0

All Articles