WEB开发网
开发学院手机开发iPhone 开发 一个简单的iPhone项目及代码 阅读

一个简单的iPhone项目及代码

 2010-08-26 11:04:00 来源:WEB开发网   
核心提示:@interface HelloUserAppDelegate : NSObject {UIWindow *window;HelloUserViewController *viewController;}@property (nonatomic, retain) IBOutlet UIWindow *window;@p

@interface HelloUserAppDelegate : NSObject {

UIWindow *window;

HelloUserViewController *viewController;

}

@property (nonatomic, retain) IBOutlet UIWindow *window;

@property (nonatomic, retain) IBOutlet HelloUserViewController *viewController;

@end

//

// HelloUserAppDelegate.h

// HelloUser

//

// Created by sin francis on 10-8-26.

// Copyright __MyCompanyName__ 2010. All rights reserved.

//

#import

@class HelloUserViewController;

@interface HelloUserAppDelegate : NSObject {

UIWindow *window;

HelloUserViewController *viewController;

}

@property (nonatomic, retain) IBOutlet UIWindow *window;

@property (nonatomic, retain) IBOutlet HelloUserViewController *viewController;

@end

Delegata的实现:

HelloUserAppDelegate.m

Cpp代码

//

// HelloUserAppDelegate.m

// HelloUser

//

// Created by sin francis on 10-8-26.

// Copyright __MyCompanyName__ 2010. All rights reserved.

//

#import "HelloUserAppDelegate.h"

#import "HelloUserViewController.h"

#import "MyNewsViewController.h"

@implementation HelloUserAppDelegate

@synthesize window;

@synthesize viewController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

// Override point for customization after app launch

[window addSubview:viewController.view];

[window makeKeyAndVisible];

return YES;

}

- (void)dealloc {

上一页  1 2 3 4 5 6 7  下一页

Tags:一个 简单 iPhone

编辑录入:coldstar [复制链接] [打 印]
赞助商链接