Alex Rivera | Logout

How to overlap UITableViewCells?

Asked 2012-10-24T09:51:44.107
11

enter image description here

If you look at the screenshot you will notice that each UITableViewCell are 20% overlapped from top portion to the upper tableview cell.

Is there any way we can overlap cells ?

Edit
Report

1 Answer

1

The overlap effect can be achieved visually by composing your cell of two parts: a narrow one on the top and a wide one on the bottom. The bottom part is simple: it is a grey rectangle with a text/image component inside. The trick is in the part on the top.

The height of the top part equals the height of the entire colored tab. Your program can put one of two images there - either a tab on top of a narrow gray strip representing the bottom of the prior cell, or a tab on top of a brown background. Inside your tableView:cellForRowAtIndexPath: check the row. If it is zero, pick the image with the brown background; otherwise, pick the image with the grey strip in the background at the top.

answered 2012-10-24T10:09:10.880

Your Answer