我编写了以下代码来提供圆角到顶部的tableViewCell。它适用于iOS 6。但对于iOS 7,它并没有引起争议。
UIBezierPath* roundedRectanglePath = [UIBezierPath bezierPathWithRoundedRect: CGRectMake(0, 0, self.frame.size.width, self.frame.size.height) byRoundingCorners: UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii: size];
[[UIColor whiteColor] setFill];
[roundedRectanglePath fill];
[[UIColor lightGrayColor] setStroke];
roundedRectanglePath.lineWidth = 1;
[roundedRectanglePath stroke];