UIBezierPath: Difference between revisions

From iPhone Development Wiki
(Created page with '{{occlass|library=UIKit.framework}} UIBezierPath is a convenient object for creating rounded-rectangular shapes. == Example == <source lang="objc"> -(void)drawRect:(CGRect)…')
(No difference)

Revision as of 17:44, 4 October 2009


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];


}