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
0
votes
1 answer

multiline CATextLayer with NSAttributedString strange spacing

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…
monolith
  • 90
  • 1
  • 9
0
votes
0 answers

NSTimer IOS setting text of layer but text disappears once timer is destroyed

I'm using an NSTimer to write text to a CATextLayer but the text only displays for a split second. I set the first timer like this: -(void) startSentanceAnimation{ float firstTime = [[sentanceArray objectAtIndex:0][@"time"]floatValue]; …
Linda Keating
  • 2,215
  • 7
  • 31
  • 63
0
votes
0 answers

Rotate CATextLayer with UIInterfaceOrientation

I have a CATextLayer as sublayer of CALayer. The CALayer rotates and so does the CATextLayer as expected. The problem is that that CATextLayer should always face upside down (according to UIInterfaceOrientationPortrait). I have tried rotating the…
iCoder
  • 1
  • 3
0
votes
1 answer

CATextLayer Animate individual characters

I am trying to find an elegant way to animate frame & opacity of individual characters in CATextLayer. However to make the completion of animation smooth I am unable to find a way to determine the position of each character in the text. The text as…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
0
votes
1 answer

cashapelayer and catextlayer as sublayer

I'm working on an ios app which among other things contains of a scrollview with nodes and edges. At first I used calayer and with key value observing for start and end nodes. Is used the following code to draw the edge and edge label: -…
freddy
  • 394
  • 1
  • 5
  • 19
0
votes
1 answer

Changing color of existing NSAttributedString

I'm trying to create a category to change the color of an existing NSAttributedString that is rendered in a CATextLayer. Here's the category implementation @implementation NSAttributedString…
olynoise
  • 2,016
  • 2
  • 19
  • 32
0
votes
1 answer

How to not scale CATextLayers when scaling super layer

My problem is: I have a CAShapeLayer named outCircle. I add some CATextLayers as sublayers of outCircle. The problem is that when I'm pinching outCircle and doing so scale it, the sublayer CATextLayers resize too (maybe obvious) and become blurry…
Philip Müller
  • 533
  • 1
  • 8
  • 13
0
votes
1 answer

CABasicAnimation only works with layers created in the same method

I need to animate different CATextLayers depending on some conditions. This is why I wrote a method that accepts the layer and animates it. Here it is: - (void) animateText:(CATextLayer*) text withColor: (CGColorRef) color andDuration:…
Yevgeniy Leychenko
  • 1,287
  • 11
  • 25
0
votes
1 answer

Appending NSAttributedStrings not working as expected

I'm trying to append attributed strings to make chord names like "G#m7" where the # and 7 are superscript. I'm doing it like this: NSFont* font = [NSFont fontWithName:kGillSans size:24]; NSMutableDictionary* attributeNormal = [[NSMutableDictionary…
olynoise
  • 2,016
  • 2
  • 19
  • 32
0
votes
1 answer

CATextLayer glyphs gets clipped or chopped off

I was trying to create an animated text label and suddenly this odd problem hit me. I am trying to write out a simple label using CATextLayer on a view. As you can see, I have tried to calculate the frame of the text by using the sizeWithAttributes:…
0
votes
0 answers

CALayer setString causes setNeedsDisplay

I have a custom UIView with several sub Layers. One is a CATextLayer. I setup the layers in the view's LayoutSubviews method. When I subsequently set the text for the CATextLayer, my custom view's layoutSubviews method gets called, causing me pain.…
Greycon
  • 793
  • 6
  • 19
0
votes
1 answer

iOS - Making CATextLayer scrollable

I would like to make this text within a layer scrollable. I am currently able to display the following text on a image. However in case the text is too long a part of it does not show up. Therefore I would like to vertically scroll it. Not very…
Armand
  • 435
  • 1
  • 11
  • 23
0
votes
1 answer

Embed rich text with CATextLAyer

I am already able to add a layer with text in it using CATextLayer. However I'm finding the way the text is presented pretty basic. I would like to write paragraphs with quotes, in bold sometimes, italic etc... Is there a way to do it with…
Armand
  • 435
  • 1
  • 11
  • 23
0
votes
2 answers

How can i make my CATextLayer object Scrollable like UITextView?

I have used CATextLayer for Displaying bold and Normal text together.Now some time i am getting long text from the Web Service response so i am not able to display complete text.Can any one please help me what should be the way to make CATextLayer…
Ankit Vyas
  • 7,507
  • 13
  • 56
  • 89
0
votes
2 answers

Catextlayer string sizes and colours

I'm having trouble getting my head around how to define certain sections of a catextlayer in different sizes, colours and how to add line breaks? I need to format a page of text like so: Title (in size 20 HelveticaNeue-Light, black) /n line…
dev6546
  • 1,412
  • 7
  • 21
  • 40
1 2 3
9
10