NSArray may not respond to componentsSeparatedByString
NSArray *Lines = [StringData componentsSeparatedByString:@"\n"];
for (NSArray *ThisLine in Lines){
NSArray *Items = [ThisLine componentsSeparatedByString:@","];
...
}
I get a warning NSArray may not respond to componentsSeparatedByString.
开发者_JAVA百科Any thoughts?
You are declaring ThisLine
as an array when it should be an NSString
. This should fix it
for (NSString *ThisLine in Lines){
精彩评论