ios - UITableView Does not show data in ipad app -
i have ipad app in using tableview show data problem not show data in tableview here code setting cell value
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"cell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) { cell = [[[uitableviewcell alloc] initwithstyle:uitableviewcellstylesubtitle reuseidentifier:cellidentifier] autorelease]; cell.selectionstyle = uitableviewcellselectionstyleblue; } if (tableview == tablecategory) { cell.textlabel.font=[uifont fontwithname:@"arial" size:16]; cell.textlabel.textalignment=uitextalignmentleft; objectdata*thecelldata = [categoryarray objectatindex:indexpath.row]; cell.textlabel.text=thecelldata.categorytitle; return cell; } else if (tableview == tablesubcategory) { cell.textlabel.font=[uifont fontwithname:@"arial" size:16]; cell.textlabel.textalignment=uitextalignmentleft; objectdata*thecelldata = [subcategoryarray objectatindex:indexpath.row]; nsstring *test = thecelldata.subcategorytitle; nslog(@"test cell %@",test); cell.textlabel.text = test; return cell; } else if(tableview == tablepublish) { cell.textlabel.font = [uifont fontwithname:@"arial" size:16]; cell.textlabel.textalignment = uitextalignmentleft; getpublishdata *thecelldata = [publisharray objectatindex:indexpath.row]; nsstring *test = [nsstring stringwithformat:@"%@:%@:%@ in:%@:%@",thecelldata.username,thecelldata.contenttitle,thecelldata.contenttype,thecelldata.catgeory,thecelldata.subcategory]; nslog(@"test cell %@",test); cell.textlabel.text = test; cell.detailtextlabel.text = thecelldata.contenaddedtime; return cell; } else { cell.textlabel.font = [uifont fontwithname:@"arial" size:16]; cell.textlabel.textalignment = uitextalignmentleft; getpublishdata *thecelldata = [publisharray objectatindex:indexpath.row]; nsstring *test = thecelldata.contentdescription; cell.textlabel.text = test; return cell; } }
i have tableview delegate , datasource still not show while check count in array shows items in not show data in tableview data showing else table not working
what returns method - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section? can show code?
also check set delegate , datasource of tables.
excuse me posting answer. haven't reputation posting in comments.
Comments
Post a Comment