I’m trying to convert my app to ARC and the converter is throwing up an error when I try to show and hide the MBProgressHUD. The code and error are below.
hud = [MBProgressHUD hideHUDForView:self.view animated:YES];
// error: Implicit conversion of 'BOOL' (aka 'signed char') to 'MBProgressHUD *' is disallowed with ARC
I don’t understand what booleans have anything to do with in this case. Do you have any ideas about what is causing this? Thanks for your help.
hideHUDForViewreturns a BOOL, that indicates if the progressHUD was hidden or not. ARC is complaining about the type of the variablehud, which should be a BOOL, not a MBProgressHUD object.The documentation for this method can be found here: http://orfoundation.github.com/ORFoundation/Classes/MBProgressHUD.html#//api/name/hideHUDForView:animated: