Skip to content

Center and resize UIBezierPath generated by PaintCode App

License

Notifications You must be signed in to change notification settings

janselv/paintcode-path-scale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Center and resize UIBezierPath generated by PaintCode App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages