Questions tagged [catextlayer]

A CATextLayer is a Core Animation layer for showing text. It allows the displaying of simple and attributed strings as well.

A CATextLayer is a Core Animation layer for showing text. It allows the displaying of simple and attributed strings as well by assigning a CFString or CFAttributedStringto its property string.

Documentation:

140 questions
3
votes
1 answer

How to animate string property of CATextLayer

Is is possible to animate the string property of a CATextLayer so that the layer will display "foo", and then "bar" after an interval? EDIT: I need to use Core Animation because I'm trying to animate this layer in an AVMutableVideoComposition. I can…
Orpheus Mercury
  • 1,617
  • 2
  • 15
  • 30
3
votes
2 answers

CATextLayer blurry text after rotation

I have problem related with question I've set contentsScale and after that text looking good but if I apply the 3d rotation transformation the text comes out blurry. image here initialization code // init text textLayer_ = [CATextLayer…
Dmitry
  • 43
  • 1
  • 4
2
votes
1 answer

Animating CATextLayer string property

I am trying to animate CATextLayer's string property so I can put a timestamp to my video using AV Foundation. Does anyone know how to animate this so I can change the string value every second??
james bond
  • 31
  • 3
2
votes
1 answer

CAlayer transform on sublayers flickers with gestures (ipad)

I have a CALayer that contains few other subLayers (CATextLayer actually) I want to apply some transformation on that layer when user do usual gesture on the ipad but it doesn't seem to be working properly. The goal of using the CALayer was to apply…
oberthelot
  • 1,310
  • 1
  • 11
  • 23
2
votes
0 answers

CATextLayer's text cut off

I want to show a CATextLayer inside of a UIView and change the text and the font of the textlayer. But texts in textlayer cut off the device in the right side. Most Weird thing is, if I send app in background and then open it again, the problem…
Shahriar Nasim Nafi
  • 1,160
  • 15
  • 19
2
votes
2 answers

CATextLayer on video pixelated text

I am creating video from images and adding overlay to them. Problem is when I try to add CATextLayer to video. Text is pixelated, take a look at the image This is the code used to generate CATextLayer: private func generateTextLayer(for text:…
Baki
  • 490
  • 4
  • 19
2
votes
1 answer

NSMutableAttributedString paragraphStyle not applying

I've added an NSMutableAttributedString to a CATextLayer. All of the attributes are applying except for the paragraphStyle. Any thoughts as to why? Thanks for the help. func createTextLayer() { let textLayer = CATextLayer() textLayer.frame =…
MT1asli8ghwoi
  • 221
  • 2
  • 11
2
votes
2 answers

How to rotate CATextLayer and preserve it's size?

I have a custom view, which I use for markup (draw lines and other figures on it). The view controller recognizes touches and gestures and passes info to the view so it can draw itself properly. Each figure has a label (CATextLayer) with some figure…
denysowova
  • 111
  • 2
  • 11
2
votes
0 answers

Why is the wordWrapping result is different CATextlayer and UILabel

I'm trying to set the text with CATextLayer and UILabel. Same Font, Size and Bounds but WordWrapping result is different. Here is my code. let textHeaderAttributes = [ NSAttributedStringKey.font: UIFont.boldSystemFont(ofSize: 24), //…
Shawn Baek
  • 1,928
  • 3
  • 20
  • 34
2
votes
0 answers

MacOS CALayer Character Spacing

I have a problem which I hope you can help me solving. I'm creating a program using Xamarin.Mac (C# for Mac) and I need to draw a DNA sequence (ATGC and so on). However, I need to know the exact position of each character so I can draw several other…
2
votes
1 answer

Why is CATextlayer using that much memory

I have a CATextLayer from the size of 3000 * 3000 with a Big Text in it. Text is say "Hello" I add this CATextlayer to my Superlayer. I have set shouldrasterize to false. When moving the superlayer with translation, then I observe a huge Memory…
mcfly soft
  • 11,289
  • 26
  • 98
  • 202
2
votes
1 answer

Blurry CATextLayer with scale transform

I'm at my wits end. I've tried what I think is everything to get rid of CATextLayer blurriness to no avail. Admittedly, some things help, but text is still far too blurry when zoomed in 2x and nowhere near the crispness of non-CATextLayer…
Dalmazio
  • 1,835
  • 2
  • 23
  • 40
2
votes
1 answer

CATextLayer is still in sublayers after calling removeFromSuperlayer

I have a mapView, which has 34 CAShapeLayer to render each province, and another 34 CATextLayer to render the name for each province. I will calculate its center for each province. Now I add this mapView into a UIScrollView, and when I zoom the…
Wingzero
  • 9,644
  • 10
  • 39
  • 80
2
votes
0 answers

CATextLayer - Set Kerning / Letter spacing

How can I set the kerning of text on a CATextLayer? I know it is possible with NSAttributed String but the text of my label changes very very often and I don't want to create a new NSAttributed String object every single frame.
Max
  • 2,699
  • 2
  • 27
  • 50
2
votes
3 answers

CATextLayer textcolor is always black

I am trying to add a CATextLayer to UITableViewCell. Problem is that text is rendering as black while I have already set its foregroundColor. Can someone tell me what I am missing? Thanks. CATextLayer *buyPrice_port = [CATextLayer…
NightFury
  • 13,436
  • 6
  • 71
  • 120
1 2
3
9 10