Reputation: 1
I want make a custom UITextView that can be drawn in to custom shape like can be seen in the image url.
Actually, I can draw the text in to a shape but it's not editable. I came across with NSTextContainer class that people using it by overriding lineFragmentRectForProposedRect method but could not find an example working with complex shapes.
Thanks.
https://i.sstatic.net/vJWh8.png
Upvotes: 0
Views: 314
Reputation: 11
Here is my demo project with text attributes and Text Kit. It has an example of custom text shape. Just make the UITextView editable. https://github.com/rambler-digital-solutions/TextKitPresentation
Upvotes: 1
Reputation: 251
You are going to have to use a bezier path - something I am not particularly familiar with - however the is documentation on Apple's website : https://developer.apple.com/library/ios/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/BezierPaths/BezierPaths.html
Upvotes: 0