Reputation: 13135
AppDelegate.h:
@interface AppDelegate : UIResponder <UIApplicationDelegate, UITabBarControllerDelegate>
+ (MBProgressHUD *)showGlobalProgressHUDWithTitle:(NSString *)title;
AppDelegate.m:
+ (MBProgressHUD *)showGlobalProgressHUDWithTitle:(NSString *)title {
UIWindow *window = [[[UIApplication sharedApplication] windows] lastObject];
[MBProgressHUD hideAllHUDsForView:window animated:YES];
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:window animated:YES];
hud.labelText = title;
return hud;
}
In someOtherMethod in AppDelegate.m:
[self showGlobalProgressHUDWithTitle:@"Checking for Updates"]; //No visible interface for AppDelegate declares the selector 'showGlobalProgressHUDWithTitle:'
Why? Other methods in the interface are visible, but why isn't this one? Does it have to do with being a Class method?
Upvotes: 0
Views: 3058
Reputation: 18670
You're calling a class method from an object instance (self).
Change + to - in your method declaration and implementation, and you're sorted.
Upvotes: 2