title: Activity Indicator webView Xcode 5 IOS 7
body: <p>Hi i have a problem with creating a Activity Indicator for my webView, this is the code im using.</p>
  
  <p>ViewController.h</p>
  
  <pre><code>@interface ViewController :UIViewController {
  IBOutlet UIWebView *webview;
  IBOutlet UIActivityIndicatorView*activityind;
  NSTimer *timer; 
  }
  @end
  </code></pre>
  
  <p>ViewController.m</p>
  
  <pre><code>@implementation ViewController
  - (void)viewDidLoad
  {
  [super viewDidLoad];
  [webview loadRequest:[NSURLRequest requestWithURL:
  [NSURLURLWithString:@"http://www.twitter.com/geekylemon"]]];
  [webview addSubview:activityind];
  timer = [NSTimer scheduledTimerWithTimeInterval:(1.0/2.0)
  target:self
  selector:@selector(loading)
  userInfo:nil
  repeats:YES];
  
  }
  
  -(void)loading {  
  if (!webview.loading)
      [activityind stopAnimating];
  else
      [activityind startAnimating];
  } 
  @end
  </code></pre>