ios - How can I make a transparent background for selected cells in UITableView -


how can make cells transparent. want show selected cells checkmark have done:

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)path {     uitableviewcell *cell = [tableview cellforrowatindexpath:path];      if (cell.accessorytype == uitableviewcellaccessorycheckmark) {         cell.accessorytype = uitableviewcellaccessorynone;     }      else {         cell.accessorytype = uitableviewcellaccessorycheckmark;     } } 

and when first create cells next line of code rid of blue background

cell.selectionstyle = uitableviewcellselectionstylenone; 

but have weird issue takes 2 clicks add , remove checkboxes. maybe not right way it?

you can read making transparent uitableviewcells here: how create uitableviewcell transparent background

and second issue, appears perhaps want:

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)path {     uitableviewcell *cell = [tableview cellforrowatindexpath:path];     cell.accessorytype = uitableviewcellaccessorycheckmark; }  - (void)tableview:(uitableview *)tableview diddeselectrowatindexpath:(nsindexpath *)path {     uitableviewcell *cell = [tableview cellforrowatindexpath:path];     cell.accessorytype = uitableviewcellaccessorynone; } 

Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -