My client's design calls for a table with cell content on irregularly-shaped white areas--basically a rectangle with a "tail". I'm constructing t开发者_如何学Pythonhat out of a UIView and a transparent UIImageView holding the "tail" part of the design. It looks nice, with one exception.
When I select a cell, the whole thing turns blue EXCEPT the UIImages. So suddenly the "tail" part of this background thing is floating on top of the blue highlight, while the UIView that makes up the rectangular body of the thing is part of all the blueness.
Question is, how can I make the UIImageView "tail" behave like the UIView in terms of highlighting behavior?
You could go about this a couple of ways. You could set the highlightedImage property of the UIImageView, but you'll need to do some work to match up the gradient. Another way is to make your UIImageView more of a mask to create the "tail", rather than an image of the tail itself. Basically, blocking out the regular tableview content. This will allow the default highlighting to show through.
精彩评论