Search code examples
iphoneitunes-app

cell.imageView curved corner on first and last cell


In the iTunes app on the iphone there is a list of songs or something.

They are in a grouped tableview and the first image has a curved corner to match the top left corner of the grouped tableView.

How would I go about replicating this (and the one at the bottom?)

alt text

Thanks

Thomas


Solution

  • Easiest way would be to use CoreAnimation with it, you could do something like this:

    [yourView layer].cornerRadius = 10;
    [yourView layer].maskToBounds = YES;
    

    where yourView is contentView having all cells inside it. ( This way you get curved corners only on first and last rows )

    Cheers, Krzysztof Zabłocki