|Inherits from||SEssentialsDecoratedView : UIView|
SEssentialsDecoratedCachedView creates a view that is a cached image of the view supplied. This can often be used to improve the speed of a carousel since it only has to transform an image and not a complex view.
To use a drop shadow effect without slowing down the framerate of a carousel use the following code in your datasource:
UIView *original = [ [ UIView alloc] initWithFrame:frame ]; original.layer.shadowRadius = 5; SEssentialsDecoratedCachedView *cachedView = [ [ SEssentialsDecoratedCachedView alloc ] initWithView:original andMargin:UIEdgeInsetsMake(5,5,5,5) ];
Note: complex effects that use layer masks or OpenGL will not be cached by this class.
SEssentialsDecoratedView from a view by capturing the image
- (instancetype)initWithView:(UIView *)view andMargin:(UIEdgeInsets)margin
The view to be cached
How much to extend the view frame, typically to capture drop shadow.