Improve performance while using shadow/glow using layers
Whenever using layers to add shadow, add rounded corners, show border or anything, just remember to set “shouldRasterize” property of a layer object to YES, default value is NO. self.layer.shouldRasterize = YES; This is what header file says about “shouldRasterize” property. When true, the layer is rendered as a bitmap in its local coordinate space (“rasterized”), then the bitmap is composited into the destination (with the minificationFilter and magnificationFilter properties of the layer applied if the bitmap needs scaling). Rasterization occurs after the layer’s filters and shadow effects are applied, but before the opacity modulation. As an implementation detail the…