Latest 1.6.0
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit

Carthage compatible
CocoaPods Support
Swift Version
License MIT

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.


ShadowOffsetRight Nooffset largeRadius

lotus Mountain CD1 CD2


  • [x] Auto resizing based on content mode.
  • [x] Easy to change paramenters including offset, radius, alpha etc.
  • [x] Storyboard(Nib) support.


  • [ ] Add support for UIView.
  • [ ] Change the way of layout, to minimize the resource usa.




You can use CocoaPods to install ShadowImageView by adding it to your Podfile:

platform :ios, '8.0'
pod 'ShadowImageView'


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"


  1. Download and drop ShadowImageView.swift in your project.
  2. Congratulations!


    /// Gaussian Blur radius, larger will make the back ground shadow lighter (warning: do not set it too large, 2 or 3 for most cases)
    public var blurRadius: CGFloat

    /// The image view contains target image
    public var image: UIImage

    /// Image's corner radius
    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
    public var shadowRadiusOffSetPercentage: CGFloat

    /// Shadow offset value on x axis, postive -> right, negative -> left
    public var shadowOffSetByX: CGFloat

    /// Shadow offset value on y axis, postive -> right, negative -> left
    public var shadowOffSetByY: CGFloat

    /// Shadow alpha value
    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.


  • iOS 8.0+
  • Swift 3+

The main development of ShadowImageView is based on Swift 3.



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.


ShadowImageView is released under the MIT license. See LICENSE for details.


Thanks to PierrePerrin, his PPMusicImageShadow inspires me, thought the implementation is diffrent, but the main idea comes from GaussianBlur.

App using ShadowImageView

  1. 优读


Latest podspec

    "name": "ShadowImageView",
    "version": "1.6.0",
    "summary": "A UIImageView smillar class that will generate iOS 10 Apple Music style shadow.",
    "description": "ShadowImageView is a iOS 10 Apple Music style image view, help you create elegent image with shadow.",
    "homepage": "",
    "screenshots": "",
    "license": "MIT",
    "authors": {
        "olddonkey": "[email protected]"
    "platforms": {
        "ios": "8.0"
    "source": {
        "git": "",
        "tag": "1.6.0"
    "source_files": [
    "frameworks": [
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "3.0"
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This