UIBezierPath is a convenient object for creating rounded-rectangular shapes.
Example
-(void)drawRect:(CGRect)rect {
UIBezierPath* roundedRect = [UIBezierPath roundedRectBezierPath:CGRectInset(rect, 5, 5)
withRoundedCorners:UIBezierPathRoundedTopLeftCorner|UIBezierPathRoundedTopRightCorner|UIBezierPathRoundedBottomLeftCorner|UIBezierPathRoundedBottomRightCorner
withCornerRadius:5.0f];
}
- How the different paths look like: http://xa1.xanga.com/70ff567527733256065727/w203670103.png