我正在尝试将字符串拆分为多个部分并插入到表格中我应该怎么做?
拆分数组时出现错误:-[__NSArrayI componentsSeparatedByString:]: unrecognized selector sent to instance 0x7a421e0
NSArray *BusRoute = alightDesc;
int i;
int count = [BusRoute count];
for (i = 0; i < count; i++)
{
NSDictionary *dic = [BusRoute objectAtIndex: i];
NSDictionary *STEPS = [dic valueForKey:@"STEPS"];
NSString *AlightDesc = [STEPS valueForKey:@"AlightDesc"];
NSLog(@"AlightDesc = %@", AlightDesc);
NSArray *aDescArray = [AlightDesc componentsSeparatedByString:@","];
NSLog(@"aDescArray = %@", aDescArray);
}
这是我要拆分的字符串,我从 NSLog 得到的
AlightDesc = (
"Block1",
"Block2",
"Block3"
)
请帮助我卡住谢谢。