开发者

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){
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜