我试图将我的应用程序转换为ARC,但当我试图显示和隐藏MBProgressHUD时,转换器抛出了一个错误。代码和错误如下。
hud = [MBProgressHUD hideHUDForView:self.view animated:YES];
// error: Implicit conversion of 'BOOL' (aka 'signed char') to 'MBProgressHUD *' is disallowed with ARC我不明白布尔值和这个案子有什么关系。你知道这是什么原因造成的吗?谢谢你的帮助。
发布于 2012-06-22 11:53:57
hideHUDForView返回一个BOOL,指示progressHUD是否被隐藏。ARC正在抱怨变量hud的类型,它应该是BOOL,而不是MBProgressHUD对象。
可以在以下位置找到此方法的文档:http://orfoundation.github.com/ORFoundation/Classes/MBProgressHUD.html#//api/name/hideHUDForView:animated
https://stackoverflow.com/questions/11149835
复制相似问题