Can I use gif image instead of default loading indicator? I am using this code so far but not getting any result. Can anyone suggest what is wrong in this code?
Yes, you can use gif images instead of default loading...
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.label.text = @"loading…";
hud.mode = MBProgressHUDModeCustomView;
UIImage *image = [[UIImage imageNamed:@"toast_loading"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
UIImageView *imgView = [[UIImageView alloc] initWithImage:image];
CABasicAnimation *anima = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
anima.toValue = http://www.cnblogs.com/Apologize/p/@(M_PI*2);
anima.duration = 1.0f;
anima.repeatCount = 10;
[imgView.layer addAnimation:anima forKey:nil];
hud.customView = imgView;
hud.bezelView.color = [UIColor colorWithWhite:0.0 alpha:1];
// text color
hud.contentColor = [UIColor whiteColor];
hud.animationType = MBProgressHUDAnimationFade;