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
1
vote
1 answer

How to render a layer hosting NSView to file

Is there any way to render a layer hosting NSView (as it appears onscreen) to a PDF or bitmap file without implementing each CALayer's –drawInContext: method (or similarly, each layer's delegate's -(void)drawLayer:inContext: method)? I just want the…
chris.bennett
  • 69
  • 1
  • 6
1
vote
1 answer

The text jumps when changing the height of a CATextLayer

When I change the height of my CATextLayer, a new text comes in from above (or below) as is depicted in the image below. How can I prevent this? @IBAction func Tap(sender: UIButton) { counter += 1 CATransaction.begin() …
ragnarius
  • 5,642
  • 10
  • 47
  • 68
1
vote
2 answers

No effect: CATextLayer wrapped

I have critical issue. I develop iOS Application. I tried to use this app on iOS 8.3, CATextLayer doesn't work as before. I thought "wrapped" property doesn't work. Because CATextLayer has correct height and width. But just text is not wrapped. If…
1
vote
1 answer

How to change the font according to the width of CATextLayer ?

For UILabel we have adjustFontSizetoWidth property is there like that we have anything for CATextLayer. I want to adjust the string to be fit in given textlayer width.
1
vote
2 answers

Invalid composition error (-11841) when trying to add CATextLayer to video

I'm trying to add text over a video but no matter what I do I get invalid composition error (-11841). I have followed tutorials, read through threads and nothing stands out as being wrong. I am combining 3 videos, and an audio track and that works…
1
vote
3 answers

How could one achieve a see-through text effect in iOS?

I would really like to achieve a see-through text style effect in my iOS app. It's pretty simple to create the desired effect in Photoshop, but I have no idea how this could be accomplished in code. The effect applied to text simply shows the…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
1
vote
1 answer

Animating font size

Simple question: I have a CATextLayer. I want to make it bigger when I pinch it with a CAAnimation (any type you desire, prefer CABasicAnimation). How can I do this? Note: can't use a simple CABasicAnimation with transform.scale as key, since if it…
Philip Müller
  • 533
  • 1
  • 8
  • 13
1
vote
1 answer

Display NSAttributedString using a CATextLayer in Monotouch

I'm using a CATextLayer to render an NSAttributedString. When done in this method the color does not render correctly. When done using CTStringAttributes the color works, but the NSAttributedString does not know its own size. This is the code I'm…
CubanAzcuy
  • 125
  • 1
  • 13
1
vote
1 answer

Number of line in CATextlayer?

I have a dynamic string with dynamic length. I use CATextlayer to draw it in a view. I set wrapped = YES, but I don't know how to check the number of line of CATextlayer in a view to set dynamic frame for another view. Please help me. Thanks.
Cong Tran
  • 1,448
  • 14
  • 30
1
vote
0 answers

Why is animationDidStart called after removeAllAnimations is called?

In animationDidStart (CABasicAnimation delegate), I want to update a CATextLayer. However, if the user touches the screen, I want to remove all the Animations that are going on by [self.maskLayer removeAllAnimations]; (All my Animations are played…
Rudolf J
  • 517
  • 4
  • 10
1
vote
0 answers

Tag text in UITextView like Facebook tags location

I have a check-in screen where an user can add comment and location. It's pretty much similar to Facebook's status update screen. Facebook screenshot: http://d.pr/i/Mz9U I am facing trouble in adding location name as a non-editable text in the text…
1
vote
1 answer

CATransaction CompletionBlock Firing Immediately

I have this piece of code that works perfectly in one of my other projects where I am achieving a 'strobe' effect of text flashing from black to white on a loop. When I copied and pasted it into another one of my projects, the CompletionBlock fires…
Kevin_TA
  • 4,575
  • 13
  • 48
  • 77
1
vote
1 answer

iOS - Issue adding my CATextLayer frame to a UIScrollView

I am trying to add my CATextLayer frame to a UIScrollView in order to get some scrolling. I have been trying to use the technique mentioned here (How can i make my CATextLayer object Scrollable like UITextView?) with no success. Actually due to the…
Armand
  • 435
  • 1
  • 11
  • 23
1
vote
1 answer

iOS - Text displayed on animation

I am animating a set of frames in iOS and would like to have a text displayed at the end of it. At this point I'm only able to animate the images. The text I'm trying to display on it using CATextLayer does not show up. I simply don't know how to…
Armand
  • 435
  • 1
  • 11
  • 23
1
vote
1 answer

iOS 5: Changing foreground color using attributed string in UITextView

This code works well on iOS 6 NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:textView.text]; [attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor redColor]…