iOS code format

This commit is contained in:
pengfei.zhou 2020-11-03 19:18:37 +08:00
parent 6064242b34
commit cfe7e96831
2 changed files with 5 additions and 5 deletions

View File

@ -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];

View File

@ -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];
} }