Correct me if im wrong, but I can't find anywhere, where you have declared the activity indicator. Try adding this into your viewDidLoad, or where it starts animating
loading = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
loading.frame =//set frame
[self.view addSubview:loading];
//Or add it to the cell in didselectrow etc
Hope this helps