(Use the SVG version of the image.) |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[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 [http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSBezierPath_Class/Reference/Reference.html NSBezierPath]. | ||
[[Image:UIBezierPath_Examples.svg|center|framed|How the different paths look like]] | [[Image:UIBezierPath_Examples.svg|center|framed|How the different paths look like]] | ||
Line 21: | Line 21: | ||
== Reference == | == Reference == | ||
* Header: http://github.com/kennytm/iphone-private-frameworks/blob/master/UIKit/UIBezierPath.h | * Header: http://github.com/kennytm/iphone-private-frameworks/blob/master/UIKit/UIBezierPath.h | ||
{{occlass|library=UIKit.framework|navbox=on}} |
Latest revision as of 09:14, 6 February 2010
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
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