0
请教我如何显示树形视图等数据。uitableview如何动态解析数据的多个单元格
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return marrSearchResult.count;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
int iCount=0;
if (section==0) {
iCount =(int)[marrSearchResult count];
}else if(section==1){
iCount =(int)[[[[marrSearchResult objectAtIndex:section] valueForKey:@"data"] valueForKey:@"result"] count]+1;
}else{
}
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *simpleTableIdentifier = @"MyTravelProfileTblCELL";
if (indexPath.section == 0) {
}else{
}
}
你能告诉我们你得到即marrSearchResult的数据? – luckyShubhra
[ { “标题”: “娱乐”, “数据”:[ { “type_title”: “餐馆”, “结果”:[ { \t \t \t “place_data”:[ { “name”:“Tim Hortons”, “address”:“1910 Yonge St”, “number”:“+1 416-481-0209”, “website”:“www.google.com” } ] } ] } ] } ] –
@luckyShubhra请检查以上阵列 –