views:

92

answers:

0

Hi everyone at stackoverflow.com! Can you help me? I would like to achieve the following graphical effect:

Each cell of my UITableView (which has a ~10 pixel decoration frame) has a "badge" in the upper right corner (showing a number), but to make it look a little nicer, this badge should not be inside the cell, but should overlap the upper right corner by 3-4 pixels to the top and to the right.

Nevertheless I would like this badge to be scrolled along with the cell and to be clipped when sliding outside the vertical (top & bottom) table view borders.

--> How can this be done?

*) I was thinking about setting all clipsToBounds = NO of superviews, but then my UITableView will become ugly. (The underlying scroll view can be seen outside the table view frame which is bad :( )

*) Another possibility would be to detach the badge UIView and bring it to the front in the root view hierarchy, but then it would be really complicated to 1) scroll it synchronously with the UITableView and 2) having 2 scroll views above each other passing touches through.

So basically the question is: Can a nested subview somehow ignore all of its superviews clipping properties? (So that it can overlap the table cell and table view frame a little bit)

Thanks for any ideas!!! X.