TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Custom |
ReleasedLast Release | Feb 2016 |
Maintained by Yasuhiro Inami.
Inner-shadow UIView/CALayer for iOS.
YIInnerShadowView* innerShadowView = [[YIInnerShadowView alloc] initWithFrame:frame];
innerShadowView.shadowRadius = 5;
innerShadowView.shadowMask = YIInnerShadowMaskVertical;
[self.view addSubview:innerShadowView];
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;
Main idea is from Matt Wilding:
http://stackoverflow.com/questions/4431292/inner-shadow-effect-on-uiview-layer
YIInnerShadowView
is available under the Beerware license.
If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.