Questions tagged [catransform3drotate]

32 questions
13
votes
1 answer

CATransform3DMakeRotation hides half the UIView during animation

Using the following UIView animation with CATransform3DMakeRotation, half the UIView will disappear during the transform and re-appear on completion. This only happens when theres a UIImageView behind the UIView in the view hierarchy of interface…
5
votes
1 answer

CATransform3D: Calculate height after perspective transform

I have a layer with a height of 50, and I'm rotating it about the x axis. . . How can I calculate the height as the rotation proceeds? CATransform3D subLayerTransform = CATransform3DMakeTranslation(0, 0, 0); subLayerTransform.m34 = -1 / 1800; //How…
Jasper Blues
  • 28,258
  • 22
  • 102
  • 185
3
votes
2 answers

Understanding CATransform3DRotate / CATransform3DMakeRotation

I'm trying to understand how to create depth perceptive to my UIView like this : I've tried this code: var rotationWithPerspective = CATransform3DIdentity; rotationWithPerspective.m34 = -1.0/500.0/2/2 rotationWithPerspective =…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
3
votes
2 answers

No perspective when using CATransform3DMakeRotation

I'm trying to perform a 3D rotation on a UIView layer using CATransform3DMakeRotation. I'm confused as to why this simple example doesn't show the perspective, but looks squished instead. I can get the rotation to work when using…
uff da
  • 597
  • 5
  • 16
3
votes
1 answer

CALayer sublayerTransform (CATransform3D) - how can I move "camera"?

Attempt A this code CATransform3D perspectiveTransform = CATransform3DIdentity; perspectiveTransform.m34 = -1.0 / 1000.0; perspectiveTransform = CATransform3DRotate(perspectiveTransform, angle / 2.0, 0.0, 1.0, 0.0); self.sublayerTransform =…
hfossli
  • 22,616
  • 10
  • 116
  • 130
2
votes
1 answer

iOS Swift - How to do 360 degree flip animation using CABasicAnimation and CATransform3DRotate with "m34" transform?

Despite all my best efforts, I can't figure out how to do a full cycle rotation animation of a UIView using CATransform3DRotate from left to right. Kindly note that I can already rotate it 360 degree with CABasicAnimation, but without…
2
votes
1 answer

How to avoid tilt/flip on CATransform3D rotation in iOS?

I used below function for 3dRotation on view. But i don't want tilt/flip on view, I just want to left/right/up/down movement on view. How i avoid tilt and flip rotation on my view ? - (void)Move3dPan:(UIPanGestureRecognizer *)gesture { if…
Mahesh Cheliya
  • 1,334
  • 1
  • 16
  • 21
2
votes
1 answer

How to rotate UIView in 3D?

I have very simple task, but I can't understand CATransform3DRotate. I have 3 UIImageView with equal height and width, and I need set some transformation for left and right items for next…
Virasio
  • 470
  • 5
  • 11
1
vote
0 answers

Swift - Rotating Image in 3D

I am rotating an image in 3D depending on the orientation of the iPhone, with the following code: It works. My questions are: Is this an acceptable approach? Is there are a single command I can use rather than building up three CATransform3DRotate…
Edward Hasted
  • 3,201
  • 8
  • 30
  • 48
1
vote
1 answer

CATransformation3D Transformed Label not saving on image

I am currently working on an Image app where I can put a Text Sticker that made with a UIView. I Applied CATransform3D to change the Perspective of the UIView. When I change the Values, it works properly and changes the Perspective View of the…
Nazmul Hasan
  • 123
  • 6
1
vote
1 answer

Chaining three CATtansform3D in Swift

Is it possible to chaining three CAtransform3D (rotate, scale, translate) in Swift? I'm using CATransform3DConcat but it's only chaining 2 transforms If yes, how i can do it? If no, is there any "cheats" to do it? Thank you
hermeneutic
  • 45
  • 2
  • 9
1
vote
0 answers

iOS: Applying CATransform3DRotate and CATransform3DScale does not have desired effect on MKMapView

In my app design I want to show tilted map (just like Apple 3D map but in pre-iOS 7 too). I am using transforms to achieve this but the results aren't satisfactory. My annotations look skewed (I want them straight & facing user - not aligning with…
Nirav Bhatt
  • 6,940
  • 5
  • 45
  • 89
1
vote
1 answer

Rotate views as a cube with CATransform3DRotate vertically instead of horizontally?

This is when I wish I would have paid more attention in my math courses. By looking at some example code I have been able to make a cube using UIviews which I can swipe left and right. The following code is to rotate my views to the left. Here The…
Uberswe
  • 1,038
  • 2
  • 16
  • 36
1
vote
1 answer

UIPanGestureRecognizer - translationInView with CATransform3D

I'm trying to implement a page flipping animation using a UIPanGestureRecognizer. Here's the code: - (void)handlePan:(UIPanGestureRecognizer *)recognizer { CGPoint location = [recognizer locationInView:self.view]; CGPoint translation =…
1
vote
1 answer

CATransform3DRotate effects gone after applying anchor point

EDIT with correct observation. I used the following two snippets to rotate an UIImageView. After the stage1, I got the desired 3D effect: the view rotate (3D effect) and stretched out (larger size). On stage2, I am trying to swing the rightView…
user523234
  • 14,323
  • 10
  • 62
  • 102
1
2 3