似乎无法在这里解决这个问题。知道需要改变什么吗?我正在使用 Xcode 4.2。
错误: AppDelegate.m:23:6:错误:接收器类型“AppDelegate”例如消息未声明带有选择器“setupHUD”的方法 [4]
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
LoginViewController *loginVC = [[LoginViewController alloc] init];
UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:loginVC];
navCon.navigationBarHidden = YES;
self.window.rootViewController = navCon;
[self setupHUD];
[self.window makeKeyAndVisible];
return YES;
}
- (void) setupHUD
{
//setup progress hud
self.HUD = [[MBProgressHUD alloc] initWithFrame:self.window.bounds];
[self.window addSubview:self.HUD];
self.HUD.dimBackground = YES;
self.HUD.minSize = CGSizeMake(150.f, 150.f);
self.HUD.delegate = self;
self.HUD.isCancelButtonAdded = YES;
self.HUD.labelText = @"Loading";
}