Animation Performance & CALayer Shadow
self.layer.contentsScale = [UIScreen mainScreen].scale;
self.layer.rasterizationScale = self.layer.contentsScale;
self.layer.shouldRasterize = YES;
self.layer.shadowOpacity = 0.7;
self.layer.shadowOffset = CGSizeMake(0, 0);
__self.layer.shadowPath =
[UIBezierPath bezierPathWithRoundedRect:
CGRectInset(self.bounds, -2, -2)
cornerRadius:self.layer.cornerRadius].CGPath;__
self.layer.shadowColor = [UIColor blackColor].CGColor;
self.layer.shadowRadius = 4;
More Detail : Animation's performance is very poor when view's shadow is on
Written by Uzys Jung
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Calayer
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#