olddonkey/ShadowImageView
소개
Apple Music 앨범 커버 스타일의 그림자 효과를 적용하는 이미지 라이브러리입니다.
디자인 및 미디어What you can do
- Auto resizing based on content mode.
- Easy to change paramenters including offset, radius, alpha etc.
- Storyboard(Nib) support.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalShadowImageView
A apple music cover picture shadow style image library
ShadowImageView is a iOS 10 Apple Music style image view, help you create elegent image with shadow.
Renderings

Features
- Auto resizing based on content mode.
- Easy to change paramenters including offset, radius, alpha etc.
- Storyboard(Nib) support.
TODO
- Add support for UIView.
- Change the way of layout, to minimize the resource usa.
Usage
Import
CocoaPods
You can use CocoaPods to install ShadowImageView by adding it to your Podfile:
platform :ios, '8.0'
use_frameworks!
pod 'ShadowImageView'
Carthage
Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/YourLibrary.framework to an iOS project.
github "olddonkey/ShadowImageView"
Manually
- Download and drop
ShadowImageView.swiftin your project. - Congratulations!
Parameters
/// Gaussian Blur radius, larger will make the back ground shadow lighter (warning: do not set it too large, 2 or 3 for most cases)
@IBInspectable
public var blurRadius: CGFloat
/// The image view contains target image
@IBInspectable
public var image: UIImage
/// Image's corner radius
@IBInspectable
public var imageCornerRaidus: CGFloat
/// shadow radius offset in percentage, if you want shadow radius larger, set a postive number for this, if you want it be smaller, then set a negative number
@IBInspectable
public var shadowRadiusOffSetPercentage: CGFloat
/// Shadow offset value on x axis, postive -> right, negative -> left
@IBInspectable
public var shadowOffSetByX: CGFloat
/// Shadow offset value on y axis, postive -> right, negative -> left
@IBInspectable
public var shadowOffSetByY: CGFloat
/// Shadow alpha value
@IBInspectable
public var shadowAlpha: CGFloat
If you want to add by storyboard or nib, just drap a UIView into your canvas, and change the class to ShadowImageView, you will see the change in storyboard or nib, it is @IBDesignable supported.
Requirements
- iOS 8.0+
- Swift 3+
The main development of ShadowImageView is based on Swift 3.
Support
Contact
Follow and contact me through email: [email protected]. If you find an issue, just open a ticket on it. Pull requests are warmly welcome as well.
License
ShadowImageView is released under the MIT license. See LICENSE for details.
Kudos
Thanks to PierrePerrin, his PPMusicImageShadow inspires me, though the implementation is diffrent, the main idea comes from GaussianBlur.
App using ShadowImageView
관련 프로젝트 살펴보기
불러오는 중…
