我有从字典值中获取数据的内容数组,现在我需要在表格视图单元格中显示数组内容,但它没有显示正确的数据。
这是源代码
for (int i = 0; i < [self.illArray count]; i++)
{
NSMutableDictionary *lDict = [self.illArray objectAtIndex:i];
NSString *lTitle = [lDict objectForKey:@"title"];
if ([lTitle rangeOfString:@"Symptoms"].length > 0)
{
[m_cIllResultArray addObject:lDict];
}
}
for (int i = 0; i < [m_cIllResultArray count]; i++)
{
sDict = [m_cIllResultArray objectAtIndex:i];
NSString *sDetail = [sDict objectForKey:@"SYMPTOMS"];
[sDict setValue:sDetail forKey:@"details"];
}
NSLog(@"ARRAY VALUES1:-%@", [sDict valueForKey:@"details"]);
数据格式为:
ARRAY VALUES : (
{
SYMPTOMS = (
"Abdominal pain",
Constipation,
Diarrhea,
"Hard to breathe"
);
independentItem = 0;
module = 117;
seqCounter = 101;
sequence = 10010;
session = 101;
title = "Low Alert: Symptoms";
},
{
SYMPTOMS = (
"Abdominal pain",
Constipation,
Diarrhea
);
independentItem = 0;
module = 117;
seqCounter = 102;
sequence = 10022;
session = 101;
title = "High Alert : Symptoms";
},
{
SYMPTOMS = (
"Abdominal pain",
Dehydration,
"Elevated temperature (>100 degrees)"
);
independentItem = 0;
module = 117;
seqCounter = 101;
sequence = 10040;
session = 101;
title = "Low Alert: Symptoms";
}
我需要在表格视图的内容中显示症状键
提前致谢