Questions tagged [catransform3d]

CATransform3D is a Objective-C/C struct defined by the Core Animation framework. It represents a homogeneous three-dimensional transform. (i.e. 3D transformation matrix)

CATransform3D is a Objective-C/C struct defined by Core Animation. It represents a homogeneous three-dimensional transform. (i.e. 3D transformation matrix)

The transform property of CALayer is a CATransform3D.

Even though they can represent 3D transformations, they are almost always used to represent 2D scales, rotates and translates.

235 questions
31
votes
2 answers

How to rotate a flat object around its center in perspective view?

What I'm trying to do seems like it should be easy enough: I created a 2D top-down view of an old phonograph record. I want to rotate it (lay it back) in its X axis and then spin it around its Z axis. I've read every question here that has…
tobinjim
  • 1,852
  • 1
  • 19
  • 30
25
votes
3 answers

How is CATransform3DMakeRotation used?

I can not figure out how to use CATransform3DMakeRotation(). Can somebody please tell me how to use it? I think the first parameter is the angle, right? But what are the other three?
21
votes
4 answers

CABasicAnimation - transform scale keep in center

Trying to animatie an ellipse masked on a UIView to be scale transformed remaining in the center position. I have found CALayer - CABasicAnimation not scaling around center/anchorPoint, and followed by adding a bounds property to the maskLayer…
Leon Storey
  • 2,944
  • 2
  • 21
  • 35
20
votes
3 answers

CATransform3D rotate causes half of image to disappear

I'm using the following code to rotate an image, but half the image (down the y-axis) that has been rotated "out of" the page, disappears. How to fix? heading is in radians. CALayer *layer = myUIImageView.layer; CATransform3D…
iPadDeveloper2011
  • 4,230
  • 1
  • 23
  • 35
20
votes
3 answers

Need better and simpler understanding of CATransform3D

Please go through the images. So this is the code which I got from some online source and it does transform my object. Besides that, I understood nothing at all. I am new to CATransform3D and want to know exactly how it works. CATransform3D…
mayuur
  • 4,696
  • 4
  • 28
  • 65
19
votes
1 answer

UIView flip vertically

I know it's probably a dummy question, but I have to ask: How to flip a UIView vertically? I'm not asking for doing a animation, but just flip it. I can do vertical flip a UILabel by: label1.layer.transform = CATransform3DMakeRotation(M_PI, 1.0f,…
user966422
  • 201
  • 1
  • 2
  • 3
19
votes
2 answers

meaning of m34 of CATransform3D

What's the meaning of m34 of the structure CATransform3D, I only know it can change the perspective, but what's the meaning when the value is -0.001 and 0.001?
Xiangwei Wang
  • 245
  • 1
  • 3
  • 7
14
votes
2 answers

How to rotate an UIImageView with CATransform3DRotate make an effect like Door Opening?

I've read and try this article (Opening door effect using Core Animation) And I implement following code in my app: CALayer *layer = threeHomeView.layer; CATransform3D initialTransform = threeHomeView.layer.transform; initialTransform.m34 = 1.0…
ZYiOS
  • 5,084
  • 3
  • 36
  • 43
14
votes
3 answers

Getting the 'scale' from a CATransform3D

I am creating an iPad app and want to update the user with the current size of a view. I used to be doing this by calculating the scale of a CGAffineTransform and multiplying the xScale by the width (of the related view) and the yScale by the…
Allyn
  • 19,710
  • 16
  • 55
  • 68
14
votes
3 answers

How to add image with parallax effect above UITableView header and keep header sticky?

Here is an image that explains everything I want to do: My question is, how would I make my view structure. The header of the table view should be fixed at top of the table. But what about the top most image that is above the table view header.…
11
votes
2 answers

iPhoneSDK calculate Rotation angle from CATransform3D

How do I calculate the Rotation in Radians around Z-axis by giving a CATransform3D struct as the input? basically what I need is the other way round of CATransform3DMakeRotation.
ravinsp
  • 3,925
  • 2
  • 28
  • 41
10
votes
5 answers

Origami transition using CATransform3D perspective

I'm trying to achieve a kind of origami transition on two UIView using only layer capabilities. The idea is to fold two views with a perspective effect. Both views have a perspective, the transition is defined by a rotation on each view, as well as…
Phil
  • 2,776
  • 2
  • 26
  • 26
9
votes
4 answers

Blurry UIView with CATransform3D only on RETINA

I'm displaying a UIView with a UILabel on it and this view&label become blurry as soon as it gets to these lines code: CATransform3D transform = CATransform3DIdentity; transform.m34 = (1.0/-500); view.layer.transform = transform; Throughout…
Bob de Graaf
  • 2,450
  • 1
  • 21
  • 39
9
votes
1 answer

UITextView after CATransform3D: scrolling all out of whack

So I have a UITextView, and in viewDidLoad I rotate its layer so it appears to be slanted back into the screen (sort of like the Star Wars opening crawl). The problem is that scrolling is all messed up. Dragging up will scroll for a bit, then jump…
DanM
  • 6,727
  • 11
  • 48
  • 83
8
votes
1 answer

Core Animation - Page flip

I would like to 'bend' a view exactly like Flipboard app. I succeeded to flip an entire view, but not to bend it. My strategy is this: make a view/layer from half of the view I want to bend, add this to the view and flip this new view. So: how do I…
Alex Tau
  • 2,579
  • 4
  • 24
  • 30
1
2 3
15 16