An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.

Overview

LoadingShimmer

An easy way to add a shimmering effect to any view with just single line of code. It is useful as an unobtrusive loading indicator. This is a network request waiting for the framework, the framework to increase the dynamic effect, convenient and fast, a line of code can be used.

CI Status Version License Platform

Demo/Example

For demo:

$ pod try LoadingShimmer

To run the example project, clone the repo, and run pod install from the Example directory first.

$ cd Example
$ pod install

If you don't have CocoaPods installed, grab it with [sudo] gem install cocoapods.

$ open LoadingShimmer.xcworkspace

Requirements

  • iOS 10.0 or later
  • Swift 5+
  • Xcode 10+

Installation

CocoaPods

LoadingShimmer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'LoadingShimmer'

Manual Installation

Just drag the LoadingShimmer.swift files into your project.

Usage

Start Covering Loading -

LoadingShimmer.startCovering(view)

Stop Covering Loading -

LoadingShimmer.stopCovering(view)

Don't forget to import LoadingShimmer

Author

Jogendra Singh

The pod is inspired by DWLoadingShimmer

License

LoadingShimmer is available under the MIT license. See the LICENSE file for more info.

Comments
  • When using Pod, not able to access access class due to internal access

    When using Pod, not able to access access class due to internal access

    I integrated using Pod, but couldn't able to access LoadingShimmer class due to default internal access of class.

    I made public access to that class by putting public keyword.

    public class LoadingShimmer: NSObject {
        public static let shared = LoadingShimmer()
    
        public class func startCovering(_ view: UIView?) {
            shared.coverSubviews(view)
        }
    
        public class func stopCovering(_ view: UIView?) {
            shared.removeSubviews(view)
        }
    
    }
    

    Would you please do the same changes in repo.

    Thanks.

    opened by Rashesh-Bosamiya 2
  • Loader for TableView Cells is hardcoded in Library

    Loader for TableView Cells is hardcoded in Library

    let coverableCellsIds = ["Cell1", "Cell1", "Cell1", "Cell1", "Cell1"] if type(of: view!) === UITableView.self { for i in 0..<coverableCellsIds.count { getTableViewPath(view, index: i, coverableCellsIds: coverableCellsIds) } addCover(view) return }

    opened by hemant3370 1
  • Address issue #27, use target view's background color.

    Address issue #27, use target view's background color.

    This PR addresses Issue #27

    Changes: _viewCover?.backgroundColor is now default clear.

    It then gets assigned to the target view to cover background color viewCover?.backgroundColor = view?.backgroundColor

    The way the animation is taking place (colors with low alpha), we need to give the colorLayer a background color as to not expose the element that is being 'loaded'. Attempt to match the targetViews background color as well, otherwise fall back to white

    Screenshot of the change:

    Example of loading

    @jogendra I did not want to over extend my boundaries so will leave podspec update / example project update to integrate this change in your hands.

    Cheers

    opened by vmammanalupo 1
  • Using Loading Shimmer changes view background color

    Using Loading Shimmer changes view background color

    Actual Behaviour Using Loading Shimmer changes a view's background color (always white background).

    Expected Behaviour Using Loading Shimmer honors the target view's background color, via using it as the backdrop while blurring its contained elements.

    Steps to reproduce it

    1. Have a view with a background color.
    2. Cover that view with a loading shimmer via LoadingShimmer.startCovering(view)
    3. Hide the loading shimmer via LoadingShimmer.stopCovering(view)

    Observe that the original background color is not honored.

    opened by vmammanalupo 1
  • Cannot open example project

    Cannot open example project

    Actual Behaviour

    I try to open example project but it shows me errors "Multiple commands produce...". I use Xcode 10.1

    Expected Behaviour

    The example app should open

    Steps to reproduce it Follow the guideline README in the project. Screenshots of the issue

    screen shot 2019-02-27 at 16 40 53

    Would you like to work on the issue? yes

    opened by HoangHuyPhi 1
  • Integrate CIrcle-CI 2.0 to the project

    Integrate CIrcle-CI 2.0 to the project

    Actual Behaviour

    Currently, no any hook for checking PR quality and testing.

    Expected Behaviour

    Integrate Circle-CI

    Steps to reproduce it

    Screenshots of the issue

    N/A

    Would you like to work on the issue?

    Yes

    help wanted good first issue beginner Hacktoberfest 
    opened by jogendra 1
  • Add a Gitter chat badge to README.md

    Add a Gitter chat badge to README.md

    imjog/AnimatedMaskLabel now has a Chat Room on Gitter

    @imjog has just created a chat room. You can visit it here: https://gitter.im/AnimatedMaskLabel/Lobby.

    This pull-request adds this badge to your README.md:

    Gitter

    If my aim is a little off, please let me know.

    Happy chatting.

    PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

    opened by gitter-badger 0
  • Does not work with UIView on iOS 15

    Does not work with UIView on iOS 15

    Actual Behaviour No animation displayed after calling LoadingShimmer.startCovering(view, with: nil)

    Expected Behaviour Animation displayed

    Steps to reproduce it override func viewDidLoad() { super.viewDidLoad()

        let animationView = UIView()
        view.addSubviews(animationView)
        
        animationView.snp.makeConstraints {
            $0.edges.equalToSuperview()
        }
        
        LoadingShimmer.startCovering(animationView, with: nil)
    }
    

    LogCat for the issue

    No crash there

    Clear view. Changing backgroundColor of the view has no affect

    Would you like to work on the issue?

    Maybe

    opened by kuzomenskyi 0
  • LoadingShimmer does not cover IB interface views

    LoadingShimmer does not cover IB interface views

    Actual Behaviour

    There is no shimmer

    image

    Expected Behaviour

    Shimmer should occur

    Steps to reproduce it

    1. Create a view controller in storyboard
    2. Create views and outlets to the views.
    3. Set the background of the view to a different color and the created subviews to a different color.
    4. Connect the outlets.

    Would you like to work on the issue? No thank you.

    
    import UIKit
    import LoadingShimmer
    
    class BugTest2ViewController: UIViewController {
    
        @IBOutlet var blackview: UIView!
        @IBOutlet var greenview: UIView!
        override func viewDidLoad() {
            super.viewDidLoad()
            LoadingShimmer.startCovering(blackview)
            LoadingShimmer.startCovering(greenview)
            // Do any additional setup after loading the view.
        }
    }
    
    bug help wanted swift Hacktoberfest 
    opened by whoyawn 0
  • Add support for UICollectionView

    Add support for UICollectionView

    Actual Behaviour

    Currently, it is supporting normal views and UITableView.

    Expected Behaviour

    Add support for UICollectionView

    Screenshots of the issue

    N/A

    Would you like to work on the issue?

    Anyone can take the issue. Feel free to open the PR.

    enhancement help wanted Hacktoberfest 
    opened by jogendra 5
Owner
Jogendra
iOS / Backend Engineer | Aviation | Go | Swift | GSoC '18 | IIT BHU'20
Jogendra
Shimmer: A super-light modifier that adds a shimmering effect to any SwiftUI View

SwiftUI-Shimmer ✨ Shimmer is a super-light modifier that adds a shimmering effec

Vikram Kriplaney 389 Jan 2, 2023
A lightweight loading animation that can be applied to any SwiftUI view with 1 line of code.

SimpleAFLoader A lightweight loading animation that can be applied to any SwiftUI view with 1 line of code. All animations are built using the SwiftUI

Fahim Rahman 2 Aug 25, 2022
ViewAnimator brings your UI to life with just one line

ViewAnimator is a library for building complex iOS UIView animations in an easy way. It provides one line animations for any view included the ones wh

Marcos Griselli 6.9k Jan 2, 2023
MotionBlur allows you to add motion blur effect to iOS animations.

MotionBlur MotionBlur allows you to add motion blur effect to your animations (currently only position's change). See the accompanying blog post to le

Arek Holko 1.5k Nov 3, 2022
A collection of animations for iOS. Simple, just add water animations.

DCAnimationKit A collection of animations for iOS Simply, just add water! DCAnimationKit is a category on UIView to make animations easy to perform. E

Dalton 797 Sep 23, 2022
BWMCoverView is a very easy to use advertising the carousel view, supports circular scrolling functions such as switching, asynchronous loading of images, animation, custom is very high.

BWMCoverView BWMCoverView is a very easy to use advertising the carousel view, supports circular scrolling functions such as switching, asynchronous l

Bi Weiming 31 Mar 10, 2021
Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle.

Twinkle ✨ Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle. This library creates several CAEmitterLayers and animate

patrick piemonte 600 Nov 24, 2022
RippleEffectView - A Neat Rippling View Effect

RippleEffectView Not only Uber-like animated screen background. RippleEffectView inspired by RayWenderlich.com article How To Create an Uber Splash Sc

Alex Sergeev 318 Dec 13, 2022
SwiftUI animated image view that works on iOS and layout just as SwiftUI.Image

SwiftUI.AnimatedImage SwiftUI animated image view that works on iOS and layout just as SwiftUI.Image Screen.Recording.2021-07-31.at.02.18.33.mov Insta

Marcin Krzyzanowski 50 Oct 14, 2022
MGFlipView allows to create flipping view in easy way without worrying about flipping animation and flipping logic.

MGFlipView About If you are looking for an easy way of implement 3D flipping view, you are in the right place. MGFlipView allows to create flipping vi

Maciej Gomółka 47 Sep 28, 2022
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing.

wobbly See Wobbly in action (examples) Add a drop of honey ?? to your project wobbly has a bunch of cool, fun, and easy to use iOS animations for you

Sagaya Abdulhafeez 150 Dec 23, 2021
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing.

wobbly See Wobbly in action (examples) Add a drop of honey ?? to your project wobbly has a bunch of cool, fun, and easy to use iOS animations for you

Sagaya Abdulhafeez 150 Dec 23, 2021
🎨 Gradient animation effect like Instagram

Pastel ?? Gradient animation effect like Instagram Example override func viewDidLoad() { super.viewDidLoad() let pastelView = PastelView(fram

Cruz 3.4k Jan 1, 2023
Genie - A Playground to recreate the macOS Genie Effect.

Genie A Playground to recreate the macOS Genie Effect. For more information, please read the accompanying blog post: Recreating the macOS Genie Effect

Harshil Shah 66 Nov 18, 2022
RetroBubbleText - A simple effect used in Retrogram which renders text with a fun bubble-style outline in SwiftUI

Retro Bubble Text This is a simple effect used in Retrogram which renders text w

Simeon Saëns 5 Aug 29, 2022
SYBlinkAnimationKit is a blink effect animation framework for iOS, written in Swift.

SYBlinkAnimationKit is a blink effect animation framework for iOS, written in Swift ?? Demo There are 5 types of animation for component. border borde

Shohei Yokoyama 126 Oct 28, 2021
An extensible iOS and OS X animation library, useful for physics-based interactions.

Pop is an extensible animation engine for iOS, tvOS, and OS X. In addition to basic static animations, it supports spring and decay dynamic animations

Meta Archive 19.8k Dec 28, 2022
Library for creating swipe actions for any SwiftUI View

SwipeActions Library for creating swipe actions for any SwiftUI View, similar to

Alexander Kraev 24 Dec 26, 2022