首页 > 代码库 > NSArray 介绍
NSArray 介绍
NSArray *array = [NSArray arrayWithObjects:@"1",@"2",@"3",nil];
[array enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
NSLog(@"%zi->%@",idx, obj);
}];
NSMutableString *string1 = [NSMutableString stringWithString:@"A"];
NSMutableString *string2 = [NSMutableString stringWithString:@"B"];
NSMutableString *string3 = [NSMutableString stringWithString:@"C"];
NSArray *listOfObjects = [NSArray arrayWithObjects:string1, string2,string3, nil];
for(NSMutableString *s in listOfObjects){
NSLog(@"This string in lowercase is %@", [s lowercaseString]);
}
[listOfObjects makeObjectsPerformSelector:@selector(appendString:)withObject:@"-MORE"];
本文出自 “深圳市联城通科技公司” 博客,谢绝转载!
NSArray 介绍