1

Possible Duplicate:
How to draw a rounded rectangle in Core Graphics / Quartz 2D?

I want to draw a rounded rectangle programmatically for my overlaying UIView,

how would I approach this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Andyy
  • 485
  • 8
  • 27

1 Answers1

3

NSBezierPath has a special +bezierPathWithRoundedRect:xRadius:yRadius:, check the documentation.

NSBezierPath *path =
  [NSBezierPath bezierPathWithRoundedRect:NSMakeRect(...)
                                  xRadius:3.0f
                                  yRadius:3.0f];
[path fill];
sidyll
  • 57,726
  • 14
  • 108
  • 151