0
我一直在关注如何使用xcode4和目标C创建一个基本的iPhone应用程序的HelloWorld教程。当我尝试从自动化类运行错误时,我没有那么感动。鉴于所有的错误都在我没有编辑过的复杂课堂中,我完全不知道出了什么问题。我无意中在某处输入了一些东西,但立即解开了它。为什么我的HelloWorld程序不能编译?
Warning: incomplete implementation
Error: Property Implementation must have it's declaration in interface "HelloWorldAppDelegate"
Error: No declaration of property 'window' found in interface
Warning: method definition for changeTheTextOnLabel not found
#import "HelloWorldAppDelegate.h"
#import "HelloWorldViewController.h"
@implementation HelloWorldAppDelegate
@synthesize window=_window;
@synthesize viewController=_viewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
}
- (void)applicationWillTerminate:(UIApplication *)application
{
}
- (void)dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}
@end
听起来像你的界面不包含'window'属性。 –
@George:让这个答案,因为它是正确的。 – JeremyP