Skip to content

little extension i wrote to create UIBezierPath from String

License

Notifications You must be signed in to change notification settings

mohammadalijf/StringToUIBezierPath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

String To UIBezierPath

create UIBezierPath from swift String

example

following code

let helloWorldString = "hello world!"
let path = helloWorldString.bezierPath(withFont: UIFont.systemFont(ofSize: 64))
let shapeLayer = CAShapeLayer(layer: holderView.layer)
shapeLayer.path = path.cgPath
shapeLayer.fillColor = fillColor
shapeLayer.strokeColor = lineColor
shapeLayer.lineWidth = 2
holderView.layer.addSublayer(shapeLayer)

results this

alt text

About

little extension i wrote to create UIBezierPath from String

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages