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

一个简单的iPhone项目及代码

 2010-08-26 11:04:00 来源:WEB开发网   
核心提示:[viewController release];[window release];[super dealloc];}@end HelloUserAppDelegate.m// HelloUser Created by sin francis on 10-8-26.// Copyright __MyCompanyNam

[viewController release];

[window release];

[super dealloc];

}

@end

//

// 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 {

[viewController release];

[window release];

[super dealloc];

}

@end

Controller的声明:

Cpp代码

//

// HelloUserViewController.h

// HelloUser

//

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

// Copyright __MyCompanyName__ 2010. All rights reserved.

//

#import

@interface HelloUserViewController : UIViewController {

//链接到HelloUserViewController.xib 界面中的display label组件

IBOutlet UILabel *displayLable;

//链接到HelloUserViewController.xib 界面中的name Field组件

IBOutlet UITextField *nameField;

//链接到HelloUserViewController.xib 界面中的Button组件

IBOutlet UIButton *sayButton;

//注意:以上的只是引用,并未真实的链接到组件上去,那么就需要我们使用Interface Builder进行链接

//1. 使用Interface Builder打开HelloUserViewController.xib,打开HelloUserViewController.xib中View

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

Tags:一个 简单 iPhone

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接