I've just created UITableViewCell. I added to it two buttons. Then I set transparent background to the cell.
cell.backgroundView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
But there is a problem. When user tapped on cell it changed the color to blue. But I don't want to see any reaction when a user is tapping.
Please see screenshots.
tapped action
Update for Swift 5:
set the selection style to none
cell.selectionStyle = .none;
Don't use - cell.isUserInteractionEnabled = false
Or your buttons won't work.
There are a few ways:
1.cell.userInteractionEnabled = NO;
(to make cell 'ready-only' - this includes the buttons)
2.cell.selectionStyle = UITableViewCellSelectionStyleNone;
(to disable just highlighting)
3.tableView.allowsSelection = NO;
(disables just highlighting for whole table)
4.tableView.UserInteractionEnabled:NO;
(to make whole table 'ready-only' - including buttons)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With