我正在从Yelp获取数据,我得到了
NSLog(@"categories:%@", categories);
NSLog(@"categories: %@", [categories class]);
NSLog(@"categories: %@", [categories componentsJoinedByString:@","]);我把日志看作是
categories:(
(
Thai,
thai
)
)
2014-06-19 16:20:47.338 yelp[28929:70b] categories class: __NSCFArray
2014-06-19 16:20:47.341 yelp[28929:70b] categories:(
(
Thai,
thai
)
)
2014-06-19 16:20:47.341 yelp[28929:70b] categories class: __NSCFArray
2014-06-19 16:20:47.343 yelp[28929:70b] categories:(
(
Thai,
thai
)
)
2014-06-19 16:20:47.343 yelp[28929:70b] categories class: __NSCFArray所以很明显,componentsJoinedByString不会加入其中。
作为一个新手,我想知道如何加入__NSCFArray的项目
发布于 2014-06-20 07:24:42
根据rmaddy的建议,我观察到了什么是不正确的。
这对我很管用
NSString *categoriesJoined = [(business[@"categories"][0]) componentsJoinedByString:@","];https://stackoverflow.com/questions/24317641
复制相似问题