Questions tagged [careplicatorlayer]

The CAReplicatorLayer class creates a specified number of copies of its sublayers (the source layer), each copy potentially having geometric, temporal and color transformations applied to it.

19 questions
19
votes
1 answer

What's the magic behind CAReplicatorLayer?

What I find interesting with CAReplicatorLayer: It is able to display a CALayer multiple times with different transforms very efficiently (how?) It seems like it somehow reuses the "backing store" for the replicated layer and even apply some color…
hfossli
  • 22,616
  • 10
  • 116
  • 130
9
votes
1 answer

Working with CAReplicatorLayer

I've been trying to create a cool text effect with the CAReplicatorlayer, CATextLayer and very basic animations. I'm trying to make the letters look like they are being droped from the top of the screen followed by cool replicators which will become…
Or Ron
  • 2,313
  • 20
  • 34
5
votes
1 answer

Is there an issue with this use of kCAMediaTimingFunctionEaseIn?

I'm using CALayer, CAReplicatorLayer and CABasicAnimation to animate a bar chart into place. The bar chart is made of up "segments" which I render as small rectangles with a CALayer. Then I add them as a sublayers to CAReplicatorLayer in a loop.…
Aaron
  • 7,055
  • 2
  • 38
  • 53
3
votes
1 answer

Snowing effect with CAReplicatorLayer

I have a single snowflake image that I would like to replicate and create snowfall on the screen. We can set the instanceCount to X to create a large number of snowflakes and we can set the instanceTransform to put each instance some distance from…
vance
  • 1,071
  • 11
  • 19
2
votes
1 answer

How to create a sparks effect using CAReplicatorLayer with some randomness?

Is it possible to create a convincing sparks effect using a CAReplicatorLayer particle system with some randomness? If so, how?
2
votes
0 answers

Replicator will crash when using view layer in xib file?

so I used a xib file and put image view in that xib file I put the view(perspectiveView) and put the image view in that view and I want to replicate perspective view so here is my codes in UIView file that is xib file class import UIKit class…
Saeed Rahmatolahi
  • 1,317
  • 2
  • 27
  • 60
2
votes
0 answers

masking an animating CALayer for use in CAReplicatorLayer to create Kaleidoscope effect

I'm trying to create a kaleidoscope in iOS (I'm aware there is a CIKaleidoscope filter but it doesn't give me the sort of effect I'm looking for so I was hoping to roll my own). I've managed to get the effect with a still image using a CALayer,…
lil'chief
  • 21
  • 1
1
vote
1 answer

Implementing a "magnifier glass" type of UI control

I am implementing an eye glass / zoom type of control that lets you see portions of an other UIView magnified. Implemented a solution that does this by taking a screenshot of the main UIView and then shows only portion of that screenshot in the…
1
vote
1 answer

Round the top and bottom of dashed line drawn with UIBezierPath

I am creating the circle below using a UIBezierPath. Notice that that there are two different colors on opposite sides of the circle. I would like to round the top and bottom of each little rectangle in the picture. I want each one of the…
coder
  • 381
  • 2
  • 22
1
vote
1 answer

CAReplicatorLayer random position

How do you introduce randomness within a CAReplicatorLayer layer? For example, randomizing the positions of each particle. Best, Vance
vance
  • 1,071
  • 11
  • 19
1
vote
1 answer

Replicating CATextLayer with different string

I am creating gridlines using CAReplicatorLayer. To each gridline, I also want to add a CATextLayer that shows the corresponding numerical value. I do not want to do this manually, however with CAReplicatorLayer there doesn't seem to be a way to…
Nikolay Spassov
  • 1,318
  • 1
  • 12
  • 22
1
vote
2 answers

CAReplicatorLayer's instanceDelay ignored

I'm trying to create multiple "cards" to animate them afterwards using this code: CAReplicatorLayer *cardsWrapperLayer = [CAReplicatorLayer layer]; cardsWrapperLayer.instanceCount = 4; cardsWrapperLayer.instanceDelay =…
Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
0
votes
1 answer

How do I delete CABasicAnimation and then restart it in Swift?

I am building an app that will show an animation when a certain function is running and remove it once the next function runs. However I need it to restart when it loops back. I have been able to remove it from the view with isHidden = true But if…
pawCheese
  • 13
  • 1
0
votes
1 answer

Mosaic light show CAReplicatorLayer animation

I'm trying to achieve this mosaic light show effect for my background view with the CAReplicatorLayer object: https://downloops.com/stock-footage/mosaic-light-show-blue-illuminated-pixel-grid-looping-background/ Each tile/CALayer is a single image…
Krekin
  • 1,516
  • 1
  • 13
  • 24
0
votes
1 answer

Making CAReplicator display horizontally

I was wondering if there was a way to take the CAReplicator, which in my use case creates two camera previews stacked on top of one another, and instead render these two horizontally. My ViewController: import UIKit import AVFoundation class…
iThompkins
  • 155
  • 1
  • 12
1
2