iOS: fix canot set pivot to zero
This commit is contained in:
parent
39e1fc98e2
commit
4aa1380a5a
@ -128,8 +128,9 @@ - (void)transformProperties {
|
|||||||
if (self.rotation) {
|
if (self.rotation) {
|
||||||
transform = CGAffineTransformRotate(transform, (self.rotation.floatValue ?: 0) * M_PI);
|
transform = CGAffineTransformRotate(transform, (self.rotation.floatValue ?: 0) * M_PI);
|
||||||
}
|
}
|
||||||
self.view.layer.anchorPoint = CGPointMake(self.pivotX.floatValue
|
self.view.layer.anchorPoint = CGPointMake(
|
||||||
?: 0.5f, self.pivotY.floatValue ?: 0.5f);
|
self.pivotX ? self.pivotX.floatValue : 0.5f,
|
||||||
|
self.pivotY ? self.pivotY.floatValue : 0.5f);
|
||||||
|
|
||||||
if (self.rotationX || self.rotationY) {
|
if (self.rotationX || self.rotationY) {
|
||||||
CATransform3D transform3D = CATransform3DMakeAffineTransform(transform);
|
CATransform3D transform3D = CATransform3DMakeAffineTransform(transform);
|
||||||
|
Reference in New Issue
Block a user