Don't forget to #import <QuartzCore/QuartzCore.h> in your implementation.
EDIT:
Adding in @Luke's comment:
Just a little gotcha that might save some other people some time make sure you have not set layer.masksToBounds to YES on your view otherwise the shadow will not appear.
Don't forget to
#import <QuartzCore/QuartzCore.h>
in your implementation.EDIT:
Adding in @Luke's comment:
Just a little gotcha that might save some other people some time make sure you have not set
layer.masksToBounds
toYES
on your view otherwise the shadow will not appear.Use: