CALayer *layer = [imageView layer];
layer.shadowOffset = CGSizeMake(0, 3); //(0,0)时是四周都有阴影
layer.shadowRadius = 5.0;
layer.shadowColor = [UIColor blackColor].CGColor;
layer.shadowOpacity = 0.5;
设置单边的阴影
向左偏移10 (-10,0)
向右偏移10 (10,0)
向上偏移10 (0,-10)
向下偏移10 (0,10)