iOS code format
This commit is contained in:
parent
6064242b34
commit
cfe7e96831
@ -30,7 +30,7 @@ @interface DoricImageView : YYAnimatedImageView
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation DoricImageView
|
@implementation DoricImageView
|
||||||
- (void)displayLayer:(CALayer *)layer {
|
- (void)displayLayer:(CALXayer *)layer {
|
||||||
if (@available(iOS 14.0, *)) {
|
if (@available(iOS 14.0, *)) {
|
||||||
if (self.isAnimating) {
|
if (self.isAnimating) {
|
||||||
[super displayLayer:layer];
|
[super displayLayer:layer];
|
||||||
|
@ -173,8 +173,8 @@ - (void)transformProperties {
|
|||||||
transform3D = CATransform3DRotate(transform3D, (self.rotationY.floatValue ?: 0) * M_PI, 0, 1, 0);
|
transform3D = CATransform3DRotate(transform3D, (self.rotationY.floatValue ?: 0) * M_PI, 0, 1, 0);
|
||||||
}
|
}
|
||||||
if (!CATransform3DEqualToTransform(transform3D, self.view.layer.transform)) {
|
if (!CATransform3DEqualToTransform(transform3D, self.view.layer.transform)) {
|
||||||
self.view.layer.shouldRasterize=TRUE;
|
self.view.layer.shouldRasterize = TRUE;
|
||||||
self.view.layer.rasterizationScale=[[UIScreen mainScreen] scale];
|
self.view.layer.rasterizationScale = [[UIScreen mainScreen] scale];
|
||||||
self.view.layer.transform = transform3D;
|
self.view.layer.transform = transform3D;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -553,8 +553,8 @@ - (void)doAnimation:(id)params withPromise:(DoricPromise *)promise {
|
|||||||
}
|
}
|
||||||
animation.removedOnCompletion = NO;
|
animation.removedOnCompletion = NO;
|
||||||
animation.fillMode = kCAFillModeForwards;
|
animation.fillMode = kCAFillModeForwards;
|
||||||
if(animation.duration==0){
|
if (animation.duration == 0) {
|
||||||
animation.duration=FLT_MIN;
|
animation.duration = FLT_MIN;
|
||||||
}
|
}
|
||||||
[self.view.layer addAnimation:animation forKey:nil];
|
[self.view.layer addAnimation:animation forKey:nil];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user