构建时出现 2 个错误,它们位于 AppDelegatem 文件中
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
有两个错误:
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
错误1:
Receiver type "ViewController" for instance messages is a forward declaration
错误2:
Receiver "ViewController" for class messages is a forward declaration
符合警报:
self.window.rootViewController = self.viewController;
警报:
Incompatible pointer types assigning to 'UIViewController *' from 'ViewController*'
如果需要,您可以在此处找到 ViewControllerm ViewControllerh AppDelegatem 的文本文件http://ninjabreakbot.com/stack/
项目适用于 iOS5,我对此很陌生。请让我知道这样的问题有什么用处。或者,如果提供了足够多的解决方案!
谢谢!