一个简单的iPhone项目及代码
2010-08-26 11:04:00 来源:WEB开发网//2. 右键单击 或者CTRL+左键单击 "File's Owner",在Received Actions一栏中可以看到sayHello的动作
//3. 拖动sayHello右边的空心圈至View界面上的按钮即可
//4. 实现你的sayHello方法吧
-(IBAction) sayHello : (id) sender;
@end
Contoller的实现:
Cpp代码
//
// HelloUserViewController.m
// HelloUser
//
// Created by sin francis on 10-8-26.
// Copyright __MyCompanyName__ 2010. All rights reserved.
//
#import "HelloUserViewController.h"
@implementation HelloUserViewController
/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
// Custom initialization
}
return self;
}
*/
/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/
/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
}
*/
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
//sayHello的实现方法
-(void) sayHello:(id)sender{
NSString *userName = nameField.text;
NSString *helomessage = [[NSString alloc]
- ››简单的修 改 SQL Server 2000数据库的端口号
- ››简单的修 改 MySQL数据库的端口号
- ››一个网站的内链布局设置技巧
- ››iphone图片拉伸的几种方法
- ››iphone正则表达式的简单使用
- ››一个专业刷流量刷排名的代码页
- ››iPhone开发Unresolved Symbols CAKeyframeAnimati...
- ››IPhone开发-“此证书是由未知颁发机构签名”解决方...
- ››IPhone开发-整合私钥和证书,生成.p12文件
- ››iPhone应用开发-UIPickerView选取器详解
- ››iphone 获取屏幕的宽度和高度
- ››iPhone读取工程包中的二进制文件
更多精彩
赞助商链接