iOS给image/view增加阴影

iOS给image/view增加阴影,第1张

这是从xcode里面摘取的内容,苹果的官方文档

/** Shadow properties. **/

/* The color of the shadow. Defaults to opaque black. Colors created

* from patterns are currently NOT supported. Animatable. */

@property(nullable) CGColorRef shadowColor

/* The opacity of the shadow. Defaults to 0. Specifying a value outside the

* [0,1] range will give undefined results. Animatable. */

@property float shadowOpacity

/* The shadow offset. Defaults to (0, -3). Animatable. */

@property CGSize shadowOffset

/* The blur radius used to create the shadow. Defaults to 3. Animatable. */

@property CGFloat shadowRadius

/* When non-null this path defines the outline used to construct the

其实就是三个属性

后面这个是做的效果图

form http://blog.csdn.net/rhljiayou/article/details/10178723

1.shadow

(1)

第一个属性:设置阴影透明度。

(2)

第二个属性:设置超过Bounds以外的区域不切除

(如果你之前没有对UIView设置这个属性,那么默认时NO,不需要重新设置)

2.border

borderColor:边框颜色

borderWidth:边框宽度

3.Radius


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11602977.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-17
下一篇 2023-05-17

发表评论

登录后才能评论

评论列表(0条)

保存