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
List tree data souce to display hierachical data structures in lists-like way. It's UI agnostic, just like view-model and doesn't depend on UI framework

SwiftListTreeDataSource List tree data souce to display hierachical data structures in lists-like way. It's UI agnostic, just like view-model, so can

Dzmitry Antonenka 26 Nov 26, 2022
Windless makes it easy to implement invisible layout loading view.

Windless Windless makes it easy to implement invisible layout loading view. Contents Requirements Installation Usage Looks Credits Communication Licen

ArLupin 940 Dec 22, 2022
Cool Animated music indicator view written in Swift

Cool Animated music indicator view written in Swift. ESTMusicIndicator is an implementation of NAKPlaybackIndicatorView in Swift for iOS 8. 本人著作的书籍《La

Aufree 465 Nov 28, 2022
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
Iridescent Effect View (inspired by Apple Pay Cash) ✨

Shiny Shiny is an iOS library that generates an iridescent effect view matched to the gyroscope, similar to the Apple Pay Cash card in the Wallet app.

Lasha Efremidze 768 Dec 2, 2022
Page view controller with bounce effect

BouncyPageViewController Page view controller with bounce effect inspired by motion design by Stan Yakushevish. Quickstart Create a queue of UIViewCon

Bohdan Orlov 843 Oct 17, 2022
Circular progress indicator for your macOS app

CircularProgress Circular progress indicator for your macOS app This package is used in production by apps like Gifski and HEIC Converter. Requirement

Sindre Sorhus 520 Jan 3, 2023
Snapchat / Instagram Stories like progress indicator

SegmentedProgressBar A simple little control that animates segments like Snapchat or Instagram Stories. Requirements iOS 8.0+ Xcode 8 Installation Dra

Dylan Marriott 442 Dec 25, 2022
Play BreakOut while loading - A playable pull to refresh view using SpriteKit

BreakOutToRefresh Play BreakOut while loading - A playable pull to refresh view using SpriteKit BreakOutToRefresh uses SpriteKit to add a playable min

Dominik Hauser 2.5k Jan 5, 2023
Apple TV Parallax effect in Swift.

MPParallaxView Apple TV Parallax effect in Swift. Rotate view using touch or accelerometer. Usage To run the example project, clone the repo, and run

Droids On Roids 1.7k Jan 4, 2023
Lightweight touch visualization library in Swift. A single line of code and visualize your touches!

TouchVisualizer is a lightweight pure Swift implementation for visualising touches on the screen. Features Works with just a single line of code! Supp

Morita Naoki 851 Dec 17, 2022
xTensions is a collection of useful class extensions for UIKit.

xTensions Intro xTensions is a collection of useful class extensions for UIKit. Swift Package Manager Note: Instructions below are for using SwiftPM w

Alexandre Garrefa 0 Nov 28, 2021
This Project is extremely useful for beginners who want to learn only SwiftUI.

This Project is extremely useful for beginners who want to learn only SwiftUI.In this project have used navigation between views, SignIn page view, Sign Up page view, Tab Bar view,

Jumman 0 Dec 31, 2021
A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView and iPhone X safe area support for content reloading. Built for iOS 10 and later.

Arale A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView support for reloading your content. Built f

Putra Z. 43 Feb 4, 2022
Elissa displays a notification on top of a UITabBarItem or any UIView anchor view to reveal additional information.

Elissa Attach a local notification to any UIView to reveal additional user guidance. Usage Example Per default, Elissa will try to align to the center

null 169 Aug 14, 2022
A number of preset loading indicators created with SwiftUI

ActivityIndicatorView A number of preset loading indicators created with SwiftUI We are a development agency building phenomenal apps. Usage Create an

Exyte 956 Dec 26, 2022
Beautiful animated placeholders for showing loading of data

KALoader Create breautiful animated placeholders for showing loading of data. You can change colors like you want. Swift 4 compatible. Usage To add an

Kirill Avery 105 May 2, 2022
A collection of awesome loading animations

NVActivityIndicatorView ⚠️ Check out LoaderUI (ready to use with Swift Package Mananger supported) for SwiftUI implementation of this. ?? Introduction

Vinh Nguyen 10.3k Dec 27, 2022
Placeholder views based on content, loading, error or empty states

StatefulViewController A protocol to enable UIViewControllers or UIViews to present placeholder views based on content, loading, error or empty states

Alexander Schuch 2.1k Dec 8, 2022