Skip to content

eroscai/ATSVGImageView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rounded Irregular Shape

中文说明

How to draw irregular shapes easily?

  • Convert irregular shapes into SVG image
  • Parse SVG image to UIBeizerPath(via PocketSVG)
  • Create ShapeLayer with UIBeizerPath

How to add rounded corners to irregular shapes?

  • Parse (CGPoint, CGPathElementType) from CGPath
  • Caculate radius for each line type points
  • Add arc to these points
  • Integrate all to generate new UIBeizerPath

Done!

demo

For more details please run DEMO project.

About

Draw rounded corners to irregularly shaped views

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published