你用的是哪个版本的MBProgressHUD
?在 v0.4(最后一个),没有这样的方法。相反showWhileExecuting
,它说:
/**
* Shows the HUD while a background task is executing in a new thread, then hides the HUD.
*
* This method also takes care of NSAutoreleasePools so your method does not have to be concerned with setting up a
* pool.
*
* @param method The method to be executed while the HUD is shown. This method will be executed in a new thread.
* @param target The object that the target method belongs to.
* @param object An optional object to be passed to the method.
* @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
* animations while disappearing.
*/
- (void)showWhileExecuting:(SEL)method
onTarget:(id)target
withObject:(id)object
animated:(BOOL)animated;
你应该做的是只显示HUD并在代表被解雇时将其移除。您应该运行连接,而不是改进格式。只要您使用异步连接,一切都会好起来的。
像这样的东西。