When I select a custom made cell it hides everything in the cell and shows only the selection color.

how can I just darken the background a bit when selected?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Alternatively to overriding
setHighlighted:, you can use the view makeup of a table view cell to your advantage.When iOS applies the highlight, it is actually using the
selectedBackgroundViewproperty of each table view cell. So, you can make a custom UIView (style it however, such as giving it your desired background colour) and set that as theselectedBackgroundViewproperty (cell.selectedBackgroundView) of the table view cell. Do this incellForRowAtIndexPath:, when customising the other details of your cell.This will mean you take control of the selection yourself; the iOS default gradient will not be applied.
It is also possible to change the
selectedBackgroundViewvia Interface Builder. In the same nib as your custom cell, create another view in the nib – not a subview of the custom table view cell – and wire that up with the `selectedBackgroundView’ outlet of the custom table view cell.