{"id":2208,"url":"https://github.com/PierrePerrin/ShadowView","last_synced_at":"2025-08-06T15:30:55.915Z","repository":{"id":62455243,"uuid":"98349346","full_name":"PierrePerrin/ShadowView","owner":"PierrePerrin","description":"An iOS Library that makes shadows management easy on UIView.","archived":false,"fork":false,"pushed_at":"2024-08-29T15:01:07.000Z","size":11248,"stargazers_count":413,"open_issues_count":1,"forks_count":22,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-01T13:38:16.358Z","etag":null,"topics":["blur","blurred-images","blurview","cocoapods","framework","free","ios","library","shadow","shadowview","swift-image","uikit","uiview"],"latest_commit_sha":null,"homepage":"https://pierreperrin.github.io/ShadowView/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PierrePerrin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-25T20:57:12.000Z","updated_at":"2024-11-16T14:55:42.000Z","dependencies_parsed_at":"2022-11-01T23:46:28.229Z","dependency_job_id":null,"html_url":"https://github.com/PierrePerrin/ShadowView","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PierrePerrin%2FShadowView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PierrePerrin%2FShadowView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PierrePerrin%2FShadowView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PierrePerrin%2FShadowView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PierrePerrin","download_url":"https://codeload.github.com/PierrePerrin/ShadowView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228915470,"owners_count":17991410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blur","blurred-images","blurview","cocoapods","framework","free","ios","library","shadow","shadowview","swift-image","uikit","uiview"],"created_at":"2024-01-05T20:16:07.630Z","updated_at":"2024-12-09T15:30:53.958Z","avatar_url":"https://github.com/PierrePerrin.png","language":"Swift","readme":"\u003cimg src=https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/ShadowLogoText.png height=\"100\"/\u003e\n\n\u003e ShadowView is an iOS Shadow library that makes view's shadow implementation easy and sweet 🎉 🎊.\n\n[![Swift Version][swift-image]][swift-url] [![Build Status][travis-image]][travis-url] [![License][license-image]][license-url] [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/EZSwiftExtensions.svg)](https://img.shields.io/cocoapods/v/LFAlertController.svg) [![Platform](https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat)](http://cocoapods.org/pods/ShadowView)\n\n---\n\nAdd simple shadows to add a gaussian blurred projection (as a shadow) to any **UIView**.\n\n![][example-image]\n\n## Table of contents\n\n\u003c!-- TOC depthFrom:2 depthTo:4 withLinks:1 updateOnSave:1 orderedList:0 --\u003e\n\n-   [Features](#features)\n-   [Requirements](#requirements)\n-   [Installation](#installation)\n    -   [CocoaPods](#cocoaPods)\n    -   [Manually](#manually)\n-   [How it works](#how-it-works)\n    -   [Normal Shadows](#normal-shadows)\n    -   [Projected Gaussian Shadows](#projected-gaussian-shadows)\n-   [Usage example](#usage-example)\n    -   [With Storyboard](#with-storyboard)\n    -   [Programmatically](#programmatically)\n-   [Parameters](#parameters)\n-   [Notes](#notes)\n-   [Contribute](#contribute)\n-   [Meta](#meta)\n    \u003c!-- /TOC --\u003e\n\n## Features\n\n-   [x] Add shadow easily from the **storyboard** and **programmatically**.\n-   [x] Add a gaussian blurred projection of your view (like iOS 10 music app).\n-   [x] Customize the border width and border color of any view from storyboard .\n\n## Requirements\n\n-   iOS 9.0+\n-   Xcode 8\n\n## Installation\n\n#### CocoaPods\n\nYou can use [CocoaPods](http://cocoapods.org/) to install `ShadowView` by adding it to your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '9.0'\nuse_frameworks!\n\ntarget '\u003cYour Target Name\u003e' do\npod 'ShadowView'\nend\n```\n\n#### Carthage\n\n1. Install Carthage via Homebrew\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\n2. Add `github \"PierrePerrin/ShadowView\"` to your Cartfile.\n\n3. Run `carthage update`.\n\n4. Drag `ShadowView.framework` from the `Carthage/Build/iOS/` directory to the `Linked Frameworks and Libraries` section of your Xcode project’s `General` settings.\n\n5. Add `$(SRCROOT)/Carthage/Build/iOS/ShadowView.framework` to `Input Files` of Run Script Phase for Carthage.\n\n#### Manually\n\n1. Download and drop all files in _ShadowView_ directory in your project.\n2. Nice Job the best shadow library is now installed! 🎉 🎊 🎈\n\n#### Import\n\nTo get the full benefits import `ShadowView` wherever you import UIKit\n\n```swift\nimport UIKit\nimport ShadowView\n```\n\n## How it works\n\n#### Normal Shadows\n\nThis shadow framework uses default CoreGraphics shadows by adding it the the layer of the view.\n\n```swift\nlayer.shadowColor : CGColor\nlayer.shadowRadius : CGFloat\nlayer.shadowOffset : CGSize\nlayer.shadowOpacity : Float\nlayer.shadowPath : CGPath?\n```\n\n#### Projected Gaussian Shadows\n\nHere the implemation is different. A shadow container need to be added and all views that needs a blurred shadow need to be subviews of this container.\n![][example2-image]\nThe container takes a screen of all it's subviews and then apply blur on it.\n\n## Usage example\n\n### With Storyboard\n\n#### Normal Shadows\n\nAny view has new paramerters in the storyboar that you can change in order to add a customize shadow to your view.\n\n#### Projected Gaussian Shadows\n\nAdd an UIView to you ViewController, change it class to ShadowView and insert in it all view that needs a blurred shadow.\n![][examplestr2-image]\n\n### Programmatically\n\n#### Normal Shadows\n\nSet the shadows parameters to your view and it the shadow will appear! 🌟\n\n```swift\nview.shadowRadius = 5\nview.shadowOffset = CGSize.zero\nview.shadowColor = UIColor.black.cgColor\nview.shadowOpacity = 0.3\n```\n\n#### Projected Gaussian Shadows\n\nCreate you container ShadowView and then add views that need Shadows inside of it.\n\n```swift\n    let exampleShadowContainerView = ShadowView()\n    let imageView = UIImageView(image: #imageLiteral(resourceName: \"sample.jpg\"))\n\n    override func loadView() {\n        super.loadView()\n\n        exampleShadowContainerView.frame = self.view.bounds\n        exampleShadowContainerView.autoresizingMask = [.flexibleWidth,.flexibleHeight]\n        exampleShadowContainerView.shadowOffset = CGSize(width: 0, height: 10)\n        exampleShadowContainerView.shadowRadius = 20\n\n        self.view.addSubview(exampleShadowContainerView)\n        self.exampleShadowContainerView.addSubview(imageView)\n        imageView.center = exampleShadowContainerView.center\n    }\n\n    override func viewDidLayoutSubviews() {\n        super.viewDidLayoutSubviews()\n        imageView.frame.size = CGSize(width: 200, height: 200)\n        imageView.center = exampleShadowContainerView.center\n        self.exampleShadowContainerView.updateShadow()\n    }\n```\n\n_Please see the example for more prescisions._\n\n## Parameters\n\n```swift\n\n//Shared Paramerters\n\n@IBInspectable public var shadowRadius : CGFloat\n\n@IBInspectable public var shadowOffset : CGSize\n\n@IBInspectable public var shadowColor : UIColor?\n\n@IBInspectable public var shadowOpacity : Float\n\n//Normal Shadow\n\n@IBInspectable var shadowPath : CGPath?\n\n//ShadowView only\n\n///It changes the size of the projected shadow view.\n@IBInspectable var shadowScale : CGFloat\n\n///Changes the tint color of the blurred image\n@IBInspectable var shadowTintColor : UIColor\n\n///Changes the saturation of the blurred image (default:1)\n@IBInspectable var shadowSaturation : CGFloat\n\n```\n\n## Notes\n\n_Don't_ use Views like Sliders or ActivityIndicators, the shadow don't update un real-time.\nIt's preferable to use statics Views like Labels, images...\n\n## Contribute\n\nWe would love you for the contribution to **ShadowView**, check the `LICENSE` file for more info.\nIf you find an issue, [open a ticket](https://github.com/olddonkey/ShadowImageView/issues/new) on it.\n\n## Meta\n\nPierre Perrin – pierreperrin@outlook.com\n\nDistributed under the MIT license. See `LICENSE` for more information.\n\n[https://github.com/PierrePerrin/](https://github.com/dbader/)\n\n[swift-image]: https://img.shields.io/badge/swift-3.0-orange.svg\n[swift-url]: https://swift.org/\n[license-image]: https://img.shields.io/badge/License-MIT-blue.svg\n[license-url]: LICENSE\n[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics\n[codebeat-image]: https://codebeat.co/badges/c19b47ea-2f9d-45df-8458-b2d952fe9dad\n[codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com\n[example-image]: https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/Example.png\n[example2-image]: https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/Example2.png\n[example2-image]: https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/Example2.png\n[examplestr2-image]: https://github.com/PierrePerrin/ShadowView/raw/master/Ressources/exampleSTR2.png\n","funding_links":[],"categories":["UI","Libs","Shadow","Swift","UI [🔝](#readme)"],"sub_categories":["Font","UI","Other free courses","Other Testing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPierrePerrin%2FShadowView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPierrePerrin%2FShadowView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPierrePerrin%2FShadowView/lists"}