catransform3drotate

CATransform3DRotate effects gone after applying anchor point

空扰寡人 提交于 2020-01-16 04:43:28
问题 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 with the hinge on the right. If I applied the line that changes the anchor point, the view swings correctly (hinge on right) with one major issue: The view's size got restored back to original size (smaller) while the (rotation) 3D effect is still

Cannot flip layer again,CALayer,CATransform3DRotate.

喜夏-厌秋 提交于 2019-12-11 19:18:45
问题 What I am trying to do is to do : Click a botton to do a vertical flip. Click a botton again, the layer wil flip it back and so on... Codes are following : @interface ViewController (){ CALayer *plane; } @end @implementation ViewController -(void)viewDidLoad { [super viewDidLoad]; [self addALayer]; } - (void)addALayer{ plane = [CALayer layer]; plane.backgroundColor = [[UIColor orangeColor] CGColor]; //[plane insertSublayer:normalBackground atIndex:0]; plane.opacity = 1; plane.frame =

Using CATransform3D

半世苍凉 提交于 2019-12-11 10:57:02
问题 I'm trying to make a rotation on a tableview to tilt the table (to give the effect of a 3d text crawl similar to the star wars opening crawl). After looking around I found this question objective-с CALayer UIView real rotation and the accepted answer seems to do what I want, however when I apply the code to my TableView it does nothing and the table appears as usual. This is the code I am copying: float distance = 50; CATransform3D basicTrans = CATransform3DIdentity; basicTrans.m34 = 1.0 /