diff --git a/doric-iOS/Pod/Classes/Shader/DoricViewNode.m b/doric-iOS/Pod/Classes/Shader/DoricViewNode.m index f15a4ed5..2d02a1f3 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricViewNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricViewNode.m @@ -128,8 +128,9 @@ - (void)transformProperties { if (self.rotation) { transform = CGAffineTransformRotate(transform, (self.rotation.floatValue ?: 0) * M_PI); } - self.view.layer.anchorPoint = CGPointMake(self.pivotX.floatValue - ?: 0.5f, self.pivotY.floatValue ?: 0.5f); + self.view.layer.anchorPoint = CGPointMake( + self.pivotX ? self.pivotX.floatValue : 0.5f, + self.pivotY ? self.pivotY.floatValue : 0.5f); if (self.rotationX || self.rotationY) { CATransform3D transform3D = CATransform3DMakeAffineTransform(transform);