view边框阴影

//添加边框
CALayer *layer = [someView layer];
layer.borderColor = [[UIColor whiteColor] CGColor];
layer.borderWidth = 5.0f;
//添加四个边阴影
someView.layer.shadowColor = [UIColor blackColor].CGColor;
someView.layer.shadowOffset = CGSizeMake(0, 0);
someView.layer.shadowOpacity = 0.5;
someView.layer.shadowRadius = 10.0;
//添加两个边阴影
someView.layer.shadowColor = [UIColor blackColor].CGColor;
someView.layer.shadowOffset = CGSizeMake(4, 4);
someView.layer.shadowOpacity = 0.5;
someView.layer.shadowRadius = 2.0;
    原文作者:Dean
    原文地址: https://segmentfault.com/a/1190000002230144
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞