摘要: 1、创建常量字符串。NSString *astring = @"This is a String!";2、创建空字符串,给予赋值。NSString *astring = [[NSString alloc] init];astring = @"This is a String!";NSLog(@"astring:%@",astring);[astring release];3、在以上方法中,提升速度:initWithString方法NSString *astring = [[NSString alloc] initWithString: 阅读全文
posted @ 2012-11-21 21:17 Kristen 阅读(775) 评论(0) 推荐(0) 编辑
摘要: 1. 如何判断用户点击的按钮UIAlertView有一个委托UIAlertViewDelegate ,继承该委托来实现点击事件头文件:@interfaceMyAlertViewViewController : UIViewController<UIAlertViewDelegate> {}- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;-(IBAction) buttonPressed;@end源文件:-(IBAction) buttonPressed{UIA 阅读全文
posted @ 2012-11-21 18:06 Kristen 阅读(196) 评论(0) 推荐(0) 编辑