PPMusicImageShadow

PPMusicImageShadow is a view that imitates in real time the shadow blurred effect of iOS Music App.

  • Owner: PierrePerrin/PPMusicImageShadow
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Check my new repo for impoved performances and compatibility of this effect (Now compatible for all UIVIews) https://github.com/PierrePerrin/ShadowView

PPMusicImageShadow

Synopsis

PPMusicImageShadow is a view that imitates in real time the shadow blurred effect of iOS Music App.

alt tag
alt tag
alt tag

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate PPMusicImageShadow into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
pod 'PPMusicImageShadow'
end

Manually

If you prefer you can clone the project, release the framework or use the view swift file directly.

Code Example

Storyboard Example

Insert a normal UIView in your viewController.

alt tag
alt tag

Change it class with "PPMusicImageShadow". Now you can set an image like an imageView, a blur radius, and a corner radius.

Programing Example

import PPMusicImageShadow

class ProgramingExampleViewController: UIViewController {

    var exampleView : PPMusicImageShadow!


    override func viewDidLoad() {
        super.viewDidLoad()

        self.addEffectView()
        self.prepareExampleView()
        self.setImageToExampleView()
    }

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()

        self.exampleView.center = self.view.center
    }

    //MARK: Example
    func addEffectView(){

        self.exampleView = PPMusicImageShadow(frame: CGRect.init(x: 0, y: 0, width: 300, height: 300))
        self.view.addSubview(self.exampleView)
    }

    func setImageToExampleView(){

        let image = UIImage(named: "prairie-679016_1920.jpg")
        self.exampleView.image = image
    }

    func prepareExampleView(){

        self.exampleView.cornerRaduis = 10
        self.exampleView.blurRadius = 5
    }
}

Main metrics

Overview
Name With OwnerPierrePerrin/PPMusicImageShadow
Primary LanguageSwift
Program languageObjective-C (Language Count: 3)
Platform
License:MIT License
所有者活动
Created At2017-03-06 20:47:21
Pushed At2017-07-27 03:21:00
Last Commit At2017-07-26 23:20:59
Release Count8
Last Release Name1.1 (Posted on )
First Release Name0.9 (Posted on )
用户参与
Stargazers Count303
Watchers Count7
Fork Count18
Commits Count24
Has Issues Enabled
Issues Count1
Issue Open Count0
Pull Requests Count1
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private