This question was already partially answered in SO
view.layer.masksToBounds = NO;
view.layer.cornerRadius = 8; // if you like rounded corners
view.layer.shadowRadius = 5;
view.layer.shadowOpacity = 0.5;
CGFloat indent = 10;
CGRect innerRect = CGRectMake(indent,indent,view.frame.size.width-2*indent,view.frame.size.height-2*indent);
view.layer.shadowPath = [UIBezierPath bezierPathWithRect:innerRect].CGPath;
Play around with the variables until they suit your shadow style.
UPDATE
Instead you can draw an outer shadow on a smaller centered view which lies on top of your existing view.
CGFloat indent = 10;
CGRect innerRect = CGRectMake(indent,indent,view.frame.size.width-2*indent,view.frame.size.height-2*indent);
UIView * shadowView = [[UIView alloc] initWithFrame:innerRect];
shadowView.backgroundColor = [UIColor clearColor];
shadowView.layer.masksToBounds = NO;
shadowView.layer.cornerRadius = 8; // if you like rounded corners
shadowView.layer.shadowRadius = 5;
shadowView.layer.shadowOpacity = 0.5;
shadowView.layer.shadowPath = [UIBezierPath bezierPathWithRect:shadowView.bounds].CGPath;
[view addSubview:shadowView];
[shadowView release];