0

I am using this code to create the UIBezierPath for letter and i have created the letter A like image below.

enter image description here

Now i want to create a UIBezierPath that follows the yellow color that is filled in CAShapeLayer like image below.

Can any one has idea how can i achieve that.

enter image description here

Community
  • 1
  • 1
iCoder86
  • 1,874
  • 6
  • 26
  • 46
  • did u try this http://stackoverflow.com/questions/34693651/how-to-draw-line-on-image-pattern-exactly/34723668#34723668 ? – Teja Nandamuri Aug 09 '16 at 12:38
  • Some what similar, but i want to draw it along with UIBezierPath automatically – iCoder86 Aug 09 '16 at 13:00
  • well: " i want to create a UIBezierPath that follows the yellow color that is filled in CAShapeLayer" , the color doesn't have a direction. you need to use the bezier path of cashapelayer anyway. – Teja Nandamuri Aug 09 '16 at 13:02
  • @TejaNandamuri: You are right, do you have any idea how can i use bezier path, so that i get the line with in the letter? – iCoder86 Aug 09 '16 at 13:06
  • As suggested in my answer, you can get the shapeLayer.path, and then draw the line manually. If you want to do it automaticallyt, then you need to do little more homework, you need a alogrithm that give you the endpoint for the letter , and then draw the bezier path that connects these end points. – Teja Nandamuri Aug 09 '16 at 13:10

0 Answers0