title: How show activity-indicator when press button for upload next view or webview?
body: <p><img src="https://i.stack.imgur.com/1d51j.png" alt="My first view is looks like  this "> 
  when i click on button which title is click here to enlarge then i want show activity indicator on the first view and remove when load this view.
  <img src="https://i.stack.imgur.com/OWnMH.png" alt="second view in which image is upload from URL in image view."></p>
  
  <p>but i go back then it show activity indicator which is shown in this view.
  <img src="https://i.stack.imgur.com/YhOgX.png" alt="first view with activity indicator"></p>
  
  <p>in first vie .m file i have use this code for action.</p>
  
  <pre><code>-(IBAction)btnSelected:(id)sender{
  UIButton *button = (UIButton *)sender;
  int whichButton = button.tag;
  NSLog(@"Current TAG: %i", whichButton);
  UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
  [spinner setCenter:CGPointMake(160,124)]; 
  [self.view addSubview:spinner]; 
  [spinner startAnimating];
  
  if(whichButton==1)
  {
      [spinner stopAnimating];
  
      first=[[FirstImage alloc]init];
      [self.navigationController pushViewController:first animated:YES];
      [spinner hidesWhenStopped ];
  
          }} 
  </code></pre>
  
  <p>in above code i have button action in which i call next view.  Now i want show/display activity indicator when view upload. In next view i have a image view in which a image i upload i have declare an activity indicator which also not working. How do that? </p>