我有一个这样的json数据
LearnerNotes = (
(
{
Notes = "Neely down";
NotesDate = "2014-10-27 13:53:47";
NotesID = 15;
},
{
Notes = Imposition;
NotesDate = "2014-10-27 13:22:28";
NotesID = 14;
}
)
);
PeriodDate = "2014-11-04T10";
PeriodID = 58127;
PersonID = 12735;
SubjectName = English;
TeacherNotes = "My Learning Choices: This note contoins the some text as the learner provide for the teacher when booking it and will always be shown first";
}
现在我只得到像这样的 LearnerNotes
NSArray *notesArray=[[[jsondata valueForKey:@"LearnerNotes"] objectAtIndex:0] valueForKey:@"Notes"];
在控制台中的目标是这样的
notesarray (
(
"Neely down",
Imposition
)
)
现在我想在 UITableView 中显示它,但它不会出现,只有最后一个值出现(拼版)。 我是 iOS 新手,请帮忙......
最佳答案
在获取 JSON 数据并构建一个包含所有注释的 NSArray
之后,将此 NSArray 保存在某个属性中。
通过实现所有必需的 UITableViewDataSource
将此 NSArray 用作 UITableView
的数据源
关于ios - 在 UITableView 中获取 JsonData,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26604884/