Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing outside the bounds of UITableViewCell

I am trying to add a "post-it note"-like image to all the cells in my UITableView. This image needs to draw (partly) outside of the bounds of the UITableViewCell.

When setting clipToBounds to NO, the image is indeed drawn outside the cell's bounds. However, (quite logically) the image is drawn below the UITableView separator lines and section headers.

I guess I could try adding the images directly to the UITableView, on top of all other elements. However, it might become rather complex trying to figure out the exact location of each cell in the UITableView, as I am using section headers.

So, before embarking on that journey, I was wondering if there might be an easier solution.

like image 562
Beav Avatar asked Apr 01 '11 14:04

Beav


1 Answers

You could try hiding the separator and then drawing your own separator behind the post-it in the UITableViewCell. That should do the trick.

like image 127
Jeff Avatar answered Oct 20 '22 03:10

Jeff