How can I set a highlighted image on a table view cell?
Posted
by nevan
on Stack Overflow
See other posts from Stack Overflow
or by nevan
Published on 2010-03-11T03:20:26Z
Indexed on
2010/03/12
2:47 UTC
Read the original article
Hit count: 393
I've followed the code in Apple's AdvancedTableViewCells and built a table view with a background image for cells. Now I want to change it so that instead of the blue highlight colour, it shows a darker version of my image. What are the steps I need to follow to do this? I'm using a UITableViewCell
subclass with a custom NIB. My background image is implemented as the cell.backgroundView
.
The steps I've take so far are:
- Change the
selectionStyle
of the cell to "None" - Set the Highlight colour on my
UILabel
subviews to a light colour - Create a darker version of my background as a separate image
- Override
setSelected: animated:
I'm wondering about the next steps.
© Stack Overflow or respective owner