ios - xcode tabelview cellview not showing only if pressed once -
so have tabelview show in cell's json array , added
cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier];
and have press cell show content ...
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *cellidentifier = @"cell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier forindexpath:indexpath] ; cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstylesubtitle reuseidentifier:cellidentifier]; cell.textlabel.text = [thearray objectatindex:indexpath.row]; cell.backgroundcolor = [self colorwithhexstring:@"dbdcd7"]; cell.textlabel.textcolor = [self colorwithhexstring:@"d74032"]; cell.detailtextlabel.text = [thearray objectatindex:indexpath.row]; return cell; }
here image of trying white cells not touched , gray ones touched http://oi57.tinypic.com/idhqaq.jpg
you can delete this:
cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstylesubtitle reuseidentifier:cellidentifier];
and set cell style in storyboard selecting cell editor, , in right panel, change style default subtitle.
Comments
Post a Comment