I need to draw an outline for a rounded rectangle. I know I can make lines and arcs, but maybe there is also a function for rounded rects?
Swift:
let rect: CGRect = ... let path = UIBezierPath(roundedRect: rect, cornerRadius: 5.0) CGContextAddPath(context, path.CGPath) CGContextSetStrokeColorWithColor(context, UIColor.clearColor().CGColor) CGContextDrawPath(context, CGPathDrawingMode.FillStroke)