title: add activity indicator to star and stop when network activity star and stop
body: <p>i'm developing an iOS aplication that uses Parse Backends, and i want to show Acctivity Indicator in my Navigation Bar to star animanting when the network Activity stars in status bar and so stop animating my Activity indicator in navigation bar when network stop the activity in status bar.</p>
  
  <p>self.navigationController.navigationBar.barTintColor = BLUE_COLOR;
      self.navigationItem.title = @"MyAppname";</p>
  
  <pre><code>UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
  UIBarButtonItem * barButton = [[UIBarButtonItem alloc] initWithCustomView:activityIndicator];
  [self navigationItem].rightBarButtonItem = barButton;
  activityIndicator.hidesWhenStopped = YES;
  //[activityIndicator startAnimating];
  
  
  
  self.photoArray =[[NSMutableArray alloc]init];
  
  PFQuery* curQuery = [UserParseHelper query];
  
  [curQuery whereKey:@"username" equalTo:[UserParseHelper currentUser].username];
  [curQuery findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
      self.mainUser = objects.firstObject;
  
      if (self.mainUser.geoPoint != nil) {
          [self queryParseMethod];
      } else {
          [self currentLocationIdentifier];
      }
  }];
  
  if ([PFUser currentUser]) {
      PFQuery *usr = [UserParseHelper query];
      [usr whereKey:@"objectId" equalTo:[UserParseHelper currentUser].objectId];
      [usr findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
          self.userStart = [UserParseHelper alloc];
          self.userStart = objects.firstObject;
          self.userStart.online = @"yes";
          [self.userStart saveEventually];
  
      }];
  }
  
  
  self.segmentedControl.selectedSegmentIndex = 2;
  </code></pre>
  
  <p>}</p>