Skip to content

Latest commit

 

History

History
38 lines (16 loc) · 732 Bytes

README.md

File metadata and controls

38 lines (16 loc) · 732 Bytes

PaintCodeScale

UIBezierPath's generated by PaintCode App are sometimes offscreen when imported to iOS, use this UIBezierPath extension to fit and center your paths into a desired CGRect.

Requirements

  • iOS 8.0+
  • Xcode 7.3

Installation

Drag UIBezierPath+.swift into your project.

Usage

After pasting the PaintCode generated code into your app, replace UIBezierPath.fill() in PaintCode code by

bezierPath.fit(into: rect).moveCenter(to: rect.center).fill()

This resize the bezier path bound rect to fit into rect without loosing quality and then center into the rect center.

Licence

PaintCodeScale is released under the MIT license.