Now it is changed with IOS & -(IBAction)save:(id)sender { HUD = [[MBProgressHUD alloc] initWithWindow:[[UIApplication sharedApplication] keyWindow]]; [[[UIApplication sharedApplication] keyWindow] addSubview:HUD]; HUD.delegate = self; HUD.labelText = @"Initiating Entropy..."; HUD.minSize = CGSizeMake(135.f, 135.f); [HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES]; } -(void)myTask { sleep(6); UIView *v = [[UIView alloc] init]; UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"check_mark_green"]]; [v setFrame:CGRectMake(0, 0, img.frame.size.width, img.frame.size.height)]; v.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"37x-Checkmark"]]; HUD.mode = MBProgressHUDModeCustomView; HUD.customView = v; HUD.labelText = nil; HUD.detailsLabelText = @"Geo-Location Cordinates Secured"; }
try this and enjoy the code.
source share