YIInnerShadowView 1.2.0

YIInnerShadowView 1.2.0

测试已测试
语言语言 Obj-CObjective C
许可证 定制
发布最新发布2016年2月

Yasuhiro Inami维护。




  • 作者
  • Yasuhiro Inami

用于 iOS 的内部阴影 UIView/CALayer。

ScreenShot1

用法

YIInnerShadowView* innerShadowView = [[YIInnerShadowView alloc] initWithFrame:frame];
innerShadowView.shadowRadius = 5;
innerShadowView.shadowMask = YIInnerShadowMaskVertical;
[self.view addSubview:innerShadowView];

YIInnerShadowMask

typedef enum {
    YIInnerShadowMaskNone       = 0,
    YIInnerShadowMaskTop        = 1 << 1,
    YIInnerShadowMaskBottom     = 1 << 2,
    YIInnerShadowMaskLeft       = 1 << 3,
    YIInnerShadowMaskRight      = 1 << 4,
    YIInnerShadowMaskVertical   = YIInnerShadowMaskTop | YIInnerShadowMaskBottom,
    YIInnerShadowMaskHorizontal = YIInnerShadowMaskLeft | YIInnerShadowMaskRight,
    YIInnerShadowMaskAll        = YIInnerShadowMaskVertical | YIInnerShadowMaskHorizontal
} YIInnerShadowMask;

致谢

主要想法来自 Matt Wilding

http://stackoverflow.com/questions/4431292/inner-shadow-effect-on-uiview-layer

许可证

YIInnerShadowViewBeerware 许可证下可用。

如果我们某天见面,你认为这个项目有它的价值,那么你可以请我喝一杯啤酒来作为回报。