iOS传递选择器和类方法的目标

时间:2012-03-05 01:38:54

标签: ios selector target class-method

我正在尝试在我的iOS项目中使用https://github.com/jdg/MBProgressHUD。这有一个我尝试使用的特定方法,如下所示:

/** 
 * 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;

我想在后台调用Singleton中的类/静态方法。我作为目标传递什么?我试过给出类名,它给了我一个错误。

0 个答案:

没有答案