iphone - UITableViewCell not showing checkmark accessory -
i have uitableview gets shown when button tapped , should display checkmark accessory on cell determined using specific string array (the array populates table view) based on index. have following code in viewdidload method:
nsindexpath *indexpath = [nsindexpath indexpathwithindex:[arrayofsounds indexofobject:currentsound]];
uitableviewcell *cell = [tableviewproperty cellforrowatindexpath:indexpath];
[cell setaccessorytype: uitableviewcellaccessorycheckmark];
but why doesn't display proper checkmark.
currentsound variable string , have correct text checked during debugging. please advise!
you should use tableview's
- (void)reloadrowsatindexpaths:(nsarray *)indexpaths withrowanimation (uitableviewrowanimation)animation; to reload cell.
Comments
Post a Comment