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

一个简单的iPhone项目及代码

 2010-08-26 11:04:00 来源:WEB开发网   
核心提示:{// Return YES for supported orientationsreturn (interfaceOrientation == UIInterfaceOrientationPortrait);}*///sayHello的实现方法-(void) sayHello:(id)sender{NSString
{

// Return YES for supported orientations

return (interfaceOrientation == UIInterfaceOrientationPortrait);

}

*/

//sayHello的实现方法

-(void) sayHello:(id)sender{

NSString *userName = nameField.text;

NSString *helomessage = [[NSString alloc] initWithFormat:@"Hello,%@",userName];

displayLable.text=helomessage;

[helomessage release];

nameField.text=NULL;

}

- (void)didReceiveMemoryWarning {

// Releases the view if it doesn't have a superview.

[super didReceiveMemoryWarning];

// Release any cached data, images, etc that aren't in use.

}

- (void)viewDidUnload {

// Release any retained subviews of the main view.

// e.g. self.myOutlet = nil;

}

- (void)dealloc {

[super dealloc];

}

@end

实例代码下载

上一页  2 3 4 5 6 7 

Tags:一个 简单 iPhone

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