Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
UIBezierPath - iPhone Development Wiki

UIBezierPath

From iPhone Development Wiki

UIBezierPath is a convenient object for creating rounded-rectangular shapes.

Starting from 3.2, this class becomes public, but the interface is dramatically changed to match that of NSBezierPath.

Error creating thumbnail: File missing
How the different paths look like

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

Reference