Giter VIP home page Giter VIP logo

glowingview's Introduction

GlowingView

A UIView extension adds customisable glow effect based on CALayer shadows.

Demo

alt tag

Try

pod try GlowingView

Requirements

  • Xcode 8+
  • Swift 3+
  • iOS 10+

Install

use_frameworks!
pod 'GlowingView'

Usage

Call startGlowing function with optional parameters to fit your glowing needs.
Call stopGlowing function to stop glowing effect.

GlowingView adds a private glowing layer top of the target view with CALayer shadows and CABasicAnimation animations.

Start Glow Signature

  public func startGlowing(
    color: UIColor = .white,
    fromIntensity: CGFloat = 0,
    toIntensity: CGFloat = 1,
    fill: Bool = false,
    position: CGPoint? = nil,
    duration: TimeInterval = 1,
    repeat shouldRepeat: Bool = true)

Demo usage

glowImageView?.startGlowing(
  color: .green,
  duration: 0.5)

fillGlowImageView?.startGlowing(
  color: .red,
  toIntensity: 0.4,
  fill: true,
  duration: 0.8)

Credits

Code heavily refactored from https://github.com/thesecretlab/UIView-Glow

glowingview's People

Stargazers

Mikhail Izbrodin avatar Beeke avatar Krzysztof Kinal avatar Bill Cheng avatar Vincent Peng avatar Pavel Lyskov avatar Ludovic Riviere avatar Ahmed Elmoghazy avatar Alex Sherbakov avatar Nika Samadashvili avatar Mark Alldritt avatar  avatar  avatar Stefan Popa avatar wanglang avatar  avatar Can Aksoy avatar Ahmet Karalar avatar Baris Sencan avatar clearbrian avatar Alessandro Aresta avatar ./c² avatar

Watchers

Patrick Wilson avatar James Cloos avatar Cem Olcay avatar  avatar

glowingview's Issues

ios 10 requirement

Is the iOS 10 requirement unnecessary? It would be much better to switch it to iOS 8, if possible.

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.