Questions tagged [catransformlayer]

CATransformLayer objects are used to create true 3D layer hierarchies, rather than the flattened hierarchy rendering model used by other CALayer classes.

A transform layer is just a special hosting layer that doesn’t flatten it’s sublayers when a transform is applied to it. So it’s a container layer that can group a bunch of transformed layers into a 3D object that can spin around in space. These can also be stacked, one 3D object inside of another.

Unlike normal layers, transform layers do not flatten their sublayers into the plane at Z=0. Due to this, they do not support many of the features of the CALayer class compositing model:

28 questions
7
votes
1 answer

On iOS, why does setting a layer's sublayerTransform turn itself to act like CATranformLayer?

It is known that the zPosition of the layers only determines which layer cover up which layer. Whether it is a zPosition of 10 or 1000 won't affect its position. That is, unless if we use CATransformLayer to contain those layers, then the zPosition…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
6
votes
2 answers

UIView 3DCube like Clear-app

I've searched all posts on google and stackoverflow but I simply can't solve this puzzle. I'm trying to recreate the effect that the now-famous todo app 'Clear' does when adding a new task. They have some sort of animation that from the top a new…
Bob de Graaf
  • 2,630
  • 1
  • 25
  • 43
6
votes
1 answer

Change perspective angle from right to left, in CATransformLayer iOS using CATransform3D

I am trying to draw one 3d block! Using 2 layers and it is looking good in 3d for right side. see the attached image. When I am trying to reuse same code for minor modification for left side! it's looking weird. See the attached image bellow, I…
Milan V.
  • 697
  • 1
  • 6
  • 22
6
votes
1 answer

Using CATransformLayer warning: changing property opaque in transform-only layer, will have no effect

I created a "TransformView" subclassing UIView in order to support a double-sided view which I am using in a flip animation. This has been suggested in other posts, eg: How to rotate a flat object around its center in perspective view? @interface…
Bbx
  • 3,184
  • 3
  • 22
  • 33
4
votes
4 answers

CATransformLayer doesn't support implicit animation?

Here's my animation code: CGFloat zDistance = 850; CGFloat scaleFactor = BACK_COVER_WIDTH / self.transformLayer.bounds.size.width; CATransform3D rotation = CATransform3DMakeRotation(M_PI, 0.0, 1.0, 0.0); CATransform3D scale =…
indragie
  • 18,002
  • 16
  • 95
  • 164
4
votes
1 answer

Autolayout and CGAffineTransform

I am trying to scale a UIView during user interaction and I implemented the CGAffineTransform on the view as follows: @implementation Tileview { CGAffineTransform _tempTransform; } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event …
Linda Keating
  • 2,215
  • 7
  • 31
  • 63
3
votes
1 answer

Scale UIView not from center, but from bottom right corner using CATransform3DScale

I want to scale (shrink) profile picture based upon scroll. But, the main thing is that, I want to scale it not from center point but from the bottom right angle. Means, that the bottom right angle should be fixed and image should be shrink from…
NSPratik
  • 4,714
  • 7
  • 51
  • 81
3
votes
1 answer

Render CATransformLayer to PNG in 3D

I'm trying to render a CATransformLayer that contains several CAShapeLayers to a png file. I know how to set up the basic rendering and that does work. Though when I call renderInContext on the CATransformLayer, it flattens everything to 2D and…
Max
  • 2,699
  • 2
  • 27
  • 50
3
votes
1 answer

CATransform3DRotate after CATransform3DTranslate

I'm trying to make a folding facebook menu like the one you can see here: http://www.mobileinc.co.uk/2012/05/folding-iphone-sidebar-menu/ For now, I'm juste working on the "folding" part. I have 2 layers: - left layer has an anchor point at {1,.5} -…
2
votes
0 answers

Is the opacity of CATransformLayer supposed to be passed onto its children?

I have a card view with a front and a back. The front and back are CALayers composed in a CATranformLayer. The back layer is transformed to flip it to face the right direction, and then moved in the z direction to be slightly behind the front. When…
Warpling
  • 2,024
  • 2
  • 22
  • 38
2
votes
0 answers

CATransformLayer - Performance issues when setting frame of sublayers

I have a CATransformLayer which has a couple of sublayers (CAShapeLayers). I'm setting the frames of my CAShapeLayers to have a size of (512, 512). Their content is (slightly) smaller than this. When rotating the whole scene in 3D it's slowing down…
Max
  • 2,699
  • 2
  • 27
  • 50
2
votes
1 answer

how to animation a label on circular path in iOS?

I am stuck at animating the uiLabel in my view. Actually I just want to animate my label/Text on a circular path. I have searched a lot over internet but couldn't find any good tutorial or example that is doing something like my problem. I have done…
iOmi
  • 625
  • 10
  • 24
2
votes
2 answers

How to rotate a view in 3d by 360 degree?

I am developing an app in which i am rotating a view by 360 degree but i am not able to rotate it 360 degree. It is getting rotated by 180 degree and after getting rotated it is coming back to it's original position.. animation = [CABasicAnimation…
Nitish Lamba
  • 157
  • 3
  • 13
1
vote
1 answer

Limiting UIPinchGestureRecognizer Zoom Levels Objective C to Swift 3.0

iOS 10.2 Swift 3.0 Trying to translate this piece of code from Paul Solt blog. Fixed by SO poster, updated code! http://paulsolt.com/blog/2011/03/limiting-uipinchgesturerecognizer-zoom-levels Sample Code -…
user3069232
  • 8,587
  • 7
  • 46
  • 87
1
vote
1 answer

Double sided UIView not working

I have a subclass of UIView called TitleView, all this subclass does is override layerClass to return CATransformLayer. My titleView property has some subviews; a titleBackgroundView and a titleLabel. When I run my code the titleView’s top layer is…
Adam Carter
  • 4,741
  • 5
  • 42
  • 103
1
2