无法处理简单的问题 - 将单元格添加到UITableView
.
我有单视图应用程序,从对象添加 - 表视图和简单NSArray
(来自互联网抓取数据的反序列化 json)。
- (void) didLoadMusicList:(APIDownload *)request
{
NSLog(@"Music list loaded");
CJSONDeserializer *deserializer = [CJSONDeserializer new];
NSDictionary *dict = [deserializer deserializeAsDictionary:request.downloadData error:nil];
NSArray *response = [dict objectForKey:@"response"];
NSArray *audios = [response subarrayWithRange:NSMakeRange(1, response.count-1)];
for(int i = 0; i < audios.count; i++)
{
NSDictionary *audio = [audios objectAtIndex:i];
// add a cell?
}
}
那么,如何为每个元素添加单元格?