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
2 answers

Format differently specific letter in a CATextLayer?

Is that possible? If not with CATextLAyer, then how can I do that?
shannoga
  • 19,649
  • 20
  • 104
  • 169
0
votes
1 answer

CATextLayer position and Transformation issue

I am trying to build a control like attached circle image with multiple segment having equal space for each part. Number of segments can change depend upon provided array. I have developed this so far using CAShapeLayer and UIBezierPath. Also added…
Surjeet Singh
  • 11,691
  • 2
  • 37
  • 54
0
votes
0 answers

Swift do not repaint CATextLayer

I'm use extension of button for implements my own method to the UIButton, and the create a CATextLayer for add 1 more text in button, but where im call this method with different arguments (Text) previous text still behind new text and over and…
0
votes
1 answer

CATextLayer cannot align to center horizontally with UILabel text in swift

When i use CATextLayer in swift 5, i align it to center by using Horizontal alignment modes follow here but it cannot align to center. Here is some of my code myLabel.textAlignment = .center textLayer.frame = myLabel.bounds; textLayer.alignmentMode…
0
votes
2 answers

How to reduce the quality of the text inside UITextView with Swift

I'm trying to reduce the quality of a message before its being sent, for example if the connect is poor I want to blur out the text in the UITextView and if connection improves or internet comes back, then remove the blur and show the normal text in…
sk123
  • 580
  • 1
  • 8
  • 29
0
votes
2 answers

CATextLayer not rendering properly on SCNNode

I have a hierarchy of CALayers that I am setting as the diffuse property of my SCNNode's material. I taking snapshots of the current state of the scene (that only has the one node) to save as a PNG to a file using this…
Jsdodgers
  • 5,253
  • 2
  • 20
  • 36
0
votes
1 answer

add textview as a sublayer of an image ios swift

let ss = CATextLayer() ss.frame = rect ss.backgroundColor = UIColor.blue.cgColor ss.foregroundColor = UIColor.cyan.cgColor ss.string = mytextView.text myImage.layer.addSublayer(ss) I am trying to add an editable textview as a sublayer of…
Faheem Rahman
  • 343
  • 2
  • 10
0
votes
1 answer

How to get "string" attribute value of CATextLayer in swift 4?

I am trying to access the text value in the CATextlayer, I can access other values but this string attribute cannot be accessed and it isn't even displayed on intellisence either. Is there some other way to access it ? I am new to swift.I have…
0
votes
2 answers

Add text to Video for specific time in iOS

I am creating a video based application where I have to select any video from local gallery and have to add a text using CATextLayer over the Video. For this I am using below code: - (void) createWatermark:(UIImage*)image video:(NSURL*)videoURL { …
Anand Gautam
  • 2,541
  • 3
  • 34
  • 70
0
votes
0 answers

How to make CATextLayer to follow the same BeizerPath defined for the shape

I am trying to make a CAShapeLayer with a sublayer of CATextLayer to follow a UIBezierPath. I am able to draw the CAShapeLayer using UIBezierPath but CATextLayer doesn't follow the same path. Here is what I did so far. // Define a bezier…
Rohit Kumar
  • 877
  • 6
  • 20
0
votes
0 answers

CATextLayer's `foregroundColor` not working with CAKeyframeAnimation and timeOffset?

I need to animate the color of CATextLayer, and the animation itself works: CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"foregroundColor"]; animation.duration = 1.0f; animation.values = @[(id)([UIColor…
Heuristic
  • 5,087
  • 9
  • 54
  • 94
0
votes
2 answers

Creating raining code Matrix effect

Created a sub class of a CATextLayer within which I attached a fadeIn animation, which I than add to a CATextLayer to which I have attached a dropThru animation. The goal to try and create matrix movie raining code effect. Works reasonably well but…
user3069232
  • 8,587
  • 7
  • 46
  • 87
0
votes
0 answers

CATextLayer : Text is not showed

When I tried to add image as CATextLayer content, text is not shown. Only image is shown. This is my code which I have placed in viewDidLoad() method, UIImage *uiimage = [UIImage imageNamed:@"flying.png"]; CATextLayer *textLayer =…
rishu1992
  • 1,414
  • 3
  • 14
  • 33
0
votes
1 answer

Scenekit: Objects become invisible after several objects are added (Objective-C)

I am building a game with SceneKit. It is based on SCNBoxes which get added and removed. At the end there are like 30 boxes added to the root node. // Prepare Surface Layer for Blocks self.colorOfBlock = [CALayer layer]; …
Alexander Langer
  • 320
  • 2
  • 11
0
votes
0 answers

Added subtitles to video however audio is removed?

I have followed the instructions in the link below for adding subtitles (under the section 'Just Like Those Foreign Films — Adding Subtitles to…
user2985043
  • 85
  • 2
  • 5