Skip to content

UIKit0/YIInnerShadowView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YIInnerShadowView

Inner-shadow UIView/CALayer for iOS.

ScreenShot1

How to use

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;

Acknowledgement

Main idea is from Matt Wilding:

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

License

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.

Packages

No packages published

Languages

  • Objective-C 94.1%
  • Ruby 5.9%