当您从 iPhoneSDK 中的“基于视图”模板创建应用程序时,会生成以下代码。我基本上明白这里发生了什么,但我没有看到 window 和 viewController 是在哪里实例化的。有什么帮助吗?
@class jojojViewController;
@interface jojojAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
jojojViewController *viewController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet jojojViewController *viewController;
@end
================================================
@implementation Test6AppDelegate
@synthesize window,mainView;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after application launch
[window makeKeyAndVisible];
}
- (void)dealloc {
[window release];
[super dealloc];
}
@end