0

Using text that I have gotten from a UITextView I render the text on top of the video. I am using a CATextLayer and getting a really strange result. When I use a UILabel to display it on the screen for a preview it looks fine and doesn't have the spacing problem.

Is there any way to format the CATextLayer so that it matches the UILabel result? So far from what I tried is that formatting the NSAttributedString before putting it on the CATextLayer does nothing.

Any advice?

monolith
  • 90
  • 1
  • 9

1 Answers1

0

Well instead of trying to get the formatting correct I fed the text through a UILabel and used the label's CALayer and it came out looking exactly the way I wanted. Not exactly the cleanest solution but it worked!

monolith
  • 90
  • 1
  • 9
  • Was the text as sharp? We're doing the same thing, but the UILabel text is much grainer than the CATextLayer text. – Crashalot Jul 01 '15 at 19:12
  • We didn't find any noticeable difference really. With the limited options of the CATextLayer it is better to just create your own text layer class from scratch. – monolith Jul 03 '15 at 00:42