I use the following code to get the tap on image view and navigate to another view controller:
-(void)tapDetected:(UIGestureRecognizer *)recognizer{
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
NSLog(@"single Tap on imageview");
ImageTapGesture *sender = (ImageTapGesture *)recognizer;
UIStoryboard * storyboard = self.storyboard;
tele * detail = [storyboard instantiateViewControllerWithIdentifier: @ "teledramaView"];
detail.imagelink = sender.imageLink;
detail.description = sender.description;
detail.id = sender.id;
[self.navigationController pushViewController: detail animated: YES];
[MBProgressHUD hideHUDForView:self.view animated:YES];
}
So far the code is working fine but the issue is the progress bar is not displaying properly.
It shows at the final moment before going to the other controller but the log comes before the progress bar: NSLog(@"single Tap on imageview");
Can anybody tell me why the progress bar is not working as it's meant to work? Thank you.