rosylxf

驾驭命运的舵是奋斗。不抱有一丝幻想,不放弃一点机会,不停止一日努力!
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年7月1日

摘要: 数组遍历的两种方式#import <Foundation/Foundation.h>int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];//也可以用:NSArray *array = [NSArray arrayWithObjects:@"One",@"Two",@"Three",nil]; NSArray* array = [[NSArray alloc] initWi 阅读全文

posted @ 2012-07-01 23:18 rosylxf 阅读(9265) 评论(0) 推荐(0)

只有注册用户登录后才能阅读该文。 阅读全文

posted @ 2012-07-01 23:11 rosylxf 阅读(7) 评论(0) 推荐(0)

只有注册用户登录后才能阅读该文。 阅读全文

posted @ 2012-07-01 23:03 rosylxf 阅读(6) 评论(0) 推荐(0)

摘要: 1 //字符串的连接 2 #import <Foundation/Foundation.h> 3 4 int main (int argc, const char * argv[]) { 5 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 6 7 NSString* str1 = @"Hello"; 8 NSString* str2 = @" World"; 9 //str1和str2都没有变,方法返回一个新的字符串10 NSString* str3 = [str1 . 阅读全文

posted @ 2012-07-01 22:51 rosylxf 阅读(412) 评论(0) 推荐(0)

摘要: 1,字符串的简单用法:#import <Foundation/Foundation.h>int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; //创建常量字符串 NSString* str=@"This is a string"; //获取字符串的长度 NSUInteger len=[str length]; NSLog(@"length=%lu", len); //result:16 .. 阅读全文

posted @ 2012-07-01 16:42 rosylxf 阅读(1560) 评论(0) 推荐(0)