假设我有一个字符串数组...
[NSArray arrayWithObjects: @"red", @"blue", @"green", @"yellow", nil]
我如何实现这样的输出...?
red is a color
blue is a color
green is a color
yellow is a color
谢谢!
最佳答案
NSArray *colors = ...;
for (NSString *color in colors) {
NSLog(@"%@ is a color", color);
}
关于objective-c - 我将如何输出这个字符串数组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5589901/