You can set the shadowPath attribute to track that of the iconView path, and set its corner radius also, like so:
UIImageView * iv = [UIImageView new];
iv.frame = CGRectMake(0, 0, 100, 50);
iv.backgroundColor = [UIColor redColor];
iv.layer.cornerRadius = 10.0f;
iv.image = [UIImage imageNamed:@"settings-120.png"];
iv.layer.cornerRadius = 10.0f;
iv.layer.shadowColor = [UIColor blackColor].CGColor;
iv.layer.shadowOffset = CGSizeZero;
iv.layer.shadowRadius = 3.0f;
iv.layer.shadowOpacity = 1.0f;
iv.layer.shadowPath = [UIBezierPath bezierPathWithRoundedRect:iv.bounds cornerRadius:iv.layer.cornerRadius].CGPath;
[self.view addSubview:iv];
If you want to set an image with UIViewContentModeScaleAspectFill (and not have it overspill), then nest it inside a holder, set the shadow on the holder and clip the imageView:
UIView * holder = [UIView new];
holder.frame = CGRectMake(0, 0, 100, 50);
holder.layer.cornerRadius = 10.0f;
holder.layer.shadowColor = [UIColor whiteColor].CGColor;
holder.layer.shadowOffset = CGSizeZero;
holder.layer.shadowRadius = 3.0f;
holder.layer.shadowOpacity = 1.0f;
holder.layer.shadowPath = [UIBezierPath bezierPathWithRoundedRect:holder.bounds cornerRadius:holder.layer.cornerRadius].CGPath;
[self.view addSubview:holder];
UIImageView * iv = [UIImageView new];
iv.frame = holder.bounds;
iv.layer.cornerRadius = holder.layer.cornerRadius;
iv.image = [UIImage imageNamed:@"settings-120.png"];
iv.contentMode = UIViewContentModeScaleAspectFill;
iv.clipsToBounds = true;
[holder addSubview:iv];