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"];
时间: 2024-12-12 00:27:42