Giter Site home page Giter Site logo

fkhannouf / dynamicblurview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kyoheig3/dynamicblurview

0.0 2.0 0.0 332 KB

DynamicBlurView is a dynamic and high performance UIView subclass for Blur.

License: MIT License

Ruby 3.29% C++ 2.85% Swift 93.86%

dynamicblurview's Introduction

DynamicBlurView

Carthage Compatibility Version License Platform

DynamicBlurView is a dynamic and high performance UIView subclass for Blur.

  • Demo gif
    Gif

  • Image capture
    Gif

  • Since using the CADisplayLink, it is a high performance.

  • UIToolbar does not use.

  • Can generate a plurality of BlurView.

How to Install DynamicBlurView

iOS 8+

Cocoapods

Add the following to your Podfile:

pod "DynamicBlurView"
use_frameworks!

Note: the use_frameworks! is required for pods made in Swift.

Carthage

Add the following to your Cartfile:

github "KyoheiG3/DynamicBlurView"

iOS 7

Just add everything in the DynamicBlurView.swift file to your project.

Usage

import

If target is ios8.0 or later, please import the DynamicBlurView.

import DynamicBlurView

Example

Blur the whole

let blurView = DynamicBlurView(frame: view.bounds)
blurView.blurRadius = 10
view.addSubview(blurView)

Animation

UIView.animateWithDuration(0.5) {
    blurView.blurRadius = 30
}

Variable

var blurRadius: CGFloat
  • Strength of the blur.
var dynamicMode: DynamicBlurView.DynamicMode
  • Mode for update frequency.
  • Common is constantly updated.
  • Tracking is only during scrolling update.
  • None is not update.
var blendColor: UIColor?
  • Blend in the blurred image.
var iterations: Int
  • Number of times for blur.
  • Default is 3.
var fullScreenCapture: Bool
  • Please be on true if the if Layer is not captured. Such as UINavigationBar and UIToolbar. Can be used only with DynamicMode.None.
  • Default is false.
var blurRatio: CGFloat
  • Ratio of radius.
  • Defauot is 1.

Function

func refresh()
  • Get blur image again. for DynamicMode.None
func remove()
  • Delete blur image. for DynamicMode.None

Acknowledgements

LICENSE

Under the MIT license. See LICENSE file for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.