#import <QuartzCore/QuartzCore.h>" to header file app
self.layer.masksToBounds = NO; self.layer.cornerRadius = 8; // if you like rounded corners
self.layer.shadowOffset = CGSizeMake(-15, 20);
self.layer.shadowRadius = 5;self.layer.shadowOpacity = 0.5; spa
This will slow down the application. Adding the following line can improve performance as long as your view is visibly rectangular: code
self.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.bounds].CGPath;