So, I have a UIView that has a shadow:
[containerFrame.layer setShadowOffset:CGSizeMake(0, 1)];
[containerFrame.layer setShadowRadius:4.0];
[containerFrame.layer setShadowColor:[UIColor colorWithRed:34/255.f green:25/255.f blue:25/255.f alpha:1.0].CGColor];
[containerFrame.layer setShadowOpacity:0.4];
with this in place, my FPS scroll drops to 20-30. Remove the shadow and then boom, my FPS will return to 60 and the scroll will be as smooth as butter. Now the question is that I need a shadow effect around this window / container. How to achieve this without slowing down scrolling?
source
share