UIBezierPath is a convenient object for creating rounded-rectangular shapes.
Error creating thumbnail: File missing
Example
-(void)drawRect:(CGRect)rect {
UIBezierPath* roundedRect = [UIBezierPath roundedRectBezierPath:CGRectInset(rect, 5, 5)
withRoundedCorners:UIBezierPathRoundedTopLeftCorner|
UIBezierPathRoundedTopRightCorner|
UIBezierPathRoundedBottomLeftCorner|
UIBezierPathRoundedBottomRightCorner
withCornerRadius:5];
[[UIColor blackColor] setFill];
[roundedRect fill];
}