Latest 0.0.2
Homepage https://github.com/cemolcay/GlowingView
License MIT
Platforms ios 10.0, tvos 10.0, requires ARC
Authors

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 paramaters 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

Latest podspec

{
    "name": "GlowingView",
    "version": "0.0.2",
    "summary": "A UIView extension adds customisable glow effect based on CALayer shadows.",
    "description": "GlowingViewn===nnA UIView extension adds customisable glow effect based on CALayer shadows.nnDemon----nn![alt tag]()nn#### Trynn``` shnpod try GlowingViewn```nnRequirementsn----nn* Xcode 8+n* Swift 3+n* iOS 10+nnInstalln----nn``` rubynuse_frameworks!npod 'GlowingView'n```nnUsagen----nnCall `startGlowing` function with optional paramaters to fit your glowing needs.nCall `stopGlowing` function to stop glowing effect.nnGlowingView adds a private glowing layer top of the target view with CALayer shadows and CABasicAnimation animations.nnn#### Start Glow Signaturenn```n  public func startGlowing(n    color: UIColor = .white,n    fromIntensity: CGFloat = 0,n    toIntensity: CGFloat = 1,n    fill: Bool = false,n    position: CGPoint? = nil,n    duration: TimeInterval = 1,n    repeat shouldRepeat: Bool = true)n```nn#### Demo usagenn```nglowImageView?.startGlowing(n  color: .green,n  duration: 0.5)nnfillGlowImageView?.startGlowing(n  color: .red,n  toIntensity: 0.4,n  fill: true,n  duration: 0.8)n```",
    "homepage": "https://github.com/cemolcay/GlowingView",
    "license": "MIT",
    "authors": {
        "cemolcay": "[email protected]"
    },
    "platforms": {
        "ios": "10.0",
        "tvos": "10.0"
    },
    "source": {
        "git": "https://github.com/cemolcay/GlowingView.git",
        "tag": "0.0.2"
    },
    "source_files": "GlowingView/GlowingView.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This