MBProgressHUD fades before finishing load

38 Views Asked by At

The MBProgressHUD fades before fully loading on app that loads a large database.

I have searched for answers to this but I cannot work out what I need to do to fix this.

This is my current code

-(void)beginParsing {
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.mode = MBProgressHUDModeIndeterminate;
hud.labelText = LOCALIZED(@"LOADING");
hud.detailsLabelText = LOCALIZED(@"LOADING2");
[self.view addSubview:hud];
[self.view setUserInteractionEnabled:YES];
[hud showAnimated:YES whileExecutingBlock:^{
    _dictJSON = [self performParsing];
} completionBlock:^{
    [hud removeFromSuperview];
    [self.view setUserInteractionEnabled:YES];
    [self setData:_dictJSON];
    [self getCategories];
    [self setFeaturedRestaurants];
    [listView reloadData];
}];
}
0

There are 0 best solutions below