A apple music cover picture shadow style image library

Related tags

Image swift image ui shadow
Overview

ShadowImageView

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.

Renderings

ShadowOffsetRight Nooffset largeRadius

lotus Mountain CD1 CD2

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

  1. Download and drop ShadowImageView.swift in your project.
  2. 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

  1. ไผ˜่ฏป

    youdu

You might also like...
An image download extension of the image view written in Swift for iOS, tvOS and macOS.
An image download extension of the image view written in Swift for iOS, tvOS and macOS.

Moa, an image downloader written in Swift for iOS, tvOS and macOS Moa is an image download library written in Swift. It allows to download and show an

๐Ÿ“ท A composable image editor using Core Image and Metal.
๐Ÿ“ท A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component ๐ŸŽ‰ v2.0.0-alpha now open!

AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.

URLImage URLImage is a SwiftUI view that displays an image downloaded from provided URL. URLImage manages downloading remote image and caching it loca

A complete Mac App: drag an image file to the top section and the bottom section will show you the text of any QRCodes in the image.

QRDecode A complete Mac App: drag an image file to the top section and the bottom section will show you the text of any QRCodes in the image. QRDecode

Convert the image to hexadecimal to send the image to e-paper

ConvertImageToHex Convert the image to hexadecimal to send the image to e-paper Conversion Order // 0. hex๋กœ ๋ณ€ํ™˜ํ•  ์ด๋ฏธ์ง€ var image = UIImage(named: "sample

Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS clients

Twitter Image Pipeline (a.k.a. TIP) Background The Twitter Image Pipeline is a streamlined framework for fetching and storing images in an application

Image-cropper - Image cropper for iOS

Image-cropper Example To run the example project, clone the repo, and run pod in

An instagram-like image editor that can apply preset filters passed to it and customized editings to a binded image.
An instagram-like image editor that can apply preset filters passed to it and customized editings to a binded image.

CZImageEditor CZImageEditor is an instagram-like image editor with clean and intuitive UI. It is pure swift and can apply preset filters and customize

An implementation of High Pass Skin Smoothing using Apple's Core Image Framework
An implementation of High Pass Skin Smoothing using Apple's Core Image Framework

YUCIHighPassSkinSmoothing An implementation of High Pass Skin Smoothing using CoreImage.framework Available on both OS X and iOS. Ports A MetalPetal b

Comments
  • iOs animations stop working

    iOs animations stop working

    When I use it sometimes ios animations stop working. I revised my code but its correct. I try to do the same without your pod and works fine. I think that it is cause you are updating the UI without using the DispatchQueue.main.async. Please revised and tell me something cause your project its incredible. Thanks

    bug 
    opened by ConnorMusic 3
  • ่ฟ™...

    ่ฟ™...

    import UIKit
    import SnapKit
    class ViewController: UIViewController {
      
      let anchorImageView: ShadowImageView = {
        let imageView = ShadowImageView()
        imageView.image = UIImage(named: "anchor")!
        return imageView
      }()
      
      override func viewDidLoad() {
        super.viewDidLoad()
        view.addSubview(anchorImageView)
        anchorImageView.snp.makeConstraints { (make) in
          make.center.equalToSuperview()
          make.width.equalTo(200)
          make.height.equalTo(200)
        }
      }
    }
    
    

    qq20170509-131116 qq20170509-131304

    bug 
    opened by FaiChou 2
  • Avoid potential memory leak

    Avoid potential memory leak

    Please use weak/unowned reference to self in escaping closure! Remove few type declaration where the type can be inferred Introduce an extension CGSize to shorten code Code formatting by Xcode

    opened by ApolloZhu 1
Releases(1.6.0)
Owner
Old Donkey
@Google
Old Donkey
iOS Picture In Picture Sample with Swift Language

PipSamleProject iOS Picture In Picture Sample with Swift Language Application Demo Resources Apple Adopting Picture in Picture Sample Video License MI

PeterLin 1 Oct 12, 2021
A SwiftUI component for launching custom picture-in-picture experiences

Pipify for SwiftUI This library introduces a new SwiftUI modifier that enables a view to be shown within a Picture in Picture overlay. This overlay al

Sidetrack 99 Dec 16, 2022
A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below.

MCScratchImageView GIF Showcase Requirments iOS 8.0+ Xcode 7.2+ Swift 4.0 Installation CocoaPods pod "MCScratchImageView" Manually Just drag MCScratch

Jaylen Bian 359 Dec 17, 2022
Style Art library process images using COREML with a set of pre trained machine learning models and convert them to Art style.

StyleArt Style Art is a library that process images using COREML with a set of pre trained machine learning models and convert them to Art style. Prev

iLeaf Solutions Pvt. Ltd. 222 Dec 17, 2022
Space! โ€“ an iOS widget displaying NASA's Astronomy Picture of the Day

Space! NASA's Astronomy Picture of the Day โ€“ now on your Home Screen with widgets! Space! displays the latest APOD photo curated by NASA every day. Se

Jacob Bandes-Storch 72 Dec 17, 2022
This simple cordova plugin will download picture from an URL and save to IOS Photo Gallery.

Photo Viewer This plugin is intended to download a picture from an URL into IOS Photo library.. How to Install Cordova: cordova plugin add https://git

Alwin jose 1 Oct 23, 2021
A UIImageView extension to let the picture-cutting with faces showing better

UIImageView-BetterFace A UIImageView extension to let the picture-cutting with faces showing better Last update in v0.2_stable : add a UIImage+BetterF

Croath Liu 779 Sep 1, 2022
Picture anonymiser using Vision face recognition

?? Anonymojizer [WIP] Anonymize people in photos by replacing their faces by emojis. How to use it ? Pick a photo from the gallery Choose an emoji The

Kaww 1 Dec 20, 2021
AYImageKit is a Swift Library for Async Image Downloading, Show Name's Initials and Can View image in Separate Screen.

AYImageKit AYImageKit is a Swift Library for Async Image Downloading. Features Async Image Downloading. Can Show Text Initials. Can have Custom Styles

Adnan Yousaf 11 Jan 10, 2022
๐Ÿ“ท A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component ?? v2.0.0-alpha now open!

Muukii 2.8k Jan 3, 2023