Show pleasant loading view for your users 😍

Overview

Build Status Version License Platform Language Twitter

RHPlaceholder πŸ’Ύ

Because traditional loading view like UIActivityIndicatorView or similar one are no longer so trendy (Facebook or Instagram apps are moving away from these approaches), I decided to create very simple library which will give you oportunity to have Facebook or Instagram 'view loading state' in your great project without big effort πŸ’₯ ! πŸ•

Play with it 😎

Installation

You can install library using Cocoapods:

pod 'RHPlaceholder'

or using Carthage:

add

github "robertherdzik/RHPlaceholder"

to your Cartfile and perform carthage update --platform iOS.

Usage

WOW... it is soo easy to use πŸ™Š ! Base integration with your storyboard VC will take couple minutes πŸ’₯

Base Usage

just create instance const of Placeholder in your ViewController:

private let placeholderMarker = Placeholder() // By default you will have Insta like gradient animation

bear in mind, that you can choose between couple of predefined animations (like e.g. RainbowAnimatorGradient):

private let placeholderMarker = Placeholder(layerAnimator: RainbowAnimatorGradient.self)

... and then just bind up library with your views which needs to be animated:

private func addPlaceholder() {
    let viewElements: [UIView] = [
        name,
        surname,
        age,
        email,
        birthDate
    ]
        
    placeholderMarker.register(viewElements)
}

call addPlaceholder() method in viewDidLoad(). Boom 😲 library has been associated with your views πŸ‘

all what left, is to controll showing 'loading state' animation on your views using startAnimation() and remove()

func fetchUserData() {
    placeholderMarker.startAnimation()
    apiManager.fetchUser() { [weak self] user in 
        self?.placeholderMarker.remove()
        // .. rest of the method
    }
}

List of available animatotrs:

(default) InstaLayerAnimatorGradient

BackAndForthLayerAnimatorGradient BlinkAnimator RainbowAnimatorGradient

Customization

You can add your own Animators, by conforming to the LayerAnimating protocol and passing your new Animator as a param to the Placeholder init.

Swift support

Library ver Swift ver Note
0.0.3 4.1 Very early version, API may change
0.0.5 4.2 Very early version, API may change
0.0.6 5.0 Very early version, API may change

Check the Demo project

Please check out the demo project, you can see there how Library has been implemented in details.

Layout Inspiration

Layout inspiration has been taken from one of the Dribbble projects, unfortunately I cannot find now this project anymore, because of that I cannot annotate creator in here 😦 ...

Assets


  • Great 😍 tab bar icons from:
Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

  • Cool 😎 profile icon from:
Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY
You might also like...
This is a beauful hud view for iPhone & iPad
This is a beauful hud view for iPhone & iPad

WSProgressHUD This is a beauful hud view for iPhone & iPad Usage To Download the project. Run the WSProgressHUD.xcodeproj in the demo directory. [

A view class for iOS that makes uploading easy and beautiful.
A view class for iOS that makes uploading easy and beautiful.

SVUploader A view class for iOS that makes uploading easy and beautiful. Demo SVUploader is fully customizable - check out 2 demos. Installation Just

Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.
Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

StepProgressView Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView. Usage let progr

Material Linear Progress Bar for your iOS apps
Material Linear Progress Bar for your iOS apps

LinearProgressBar Material Linear Progress Bar for your iOS apps Installation Carthage: github "Recouse/LinearProgressBar" CocoaPods: Add this to you

RxBluetoothKit is a Bluetooth library that makes interaction with BLE devices much more pleasant.
RxBluetoothKit is a Bluetooth library that makes interaction with BLE devices much more pleasant.

RxBluetoothKit is a Bluetooth library that makes interaction with BLE devices much more pleasant. It's backed by RxSwift and CoreBluetooth and it prov

Lightweight utilities for making OSLog more pleasant

UnifiedLoggingPlus Lightweight utilities for making OSLog more pleasant. Integration Swift Package Manager

A SwiftUI view for dynamically rendering content based upon "loading", "error", and "completed" data loading states.

SwiftUIAsyncContentView A SwiftUI view for dynamically rendering content based upon "loading", "error", and "completed" data loading states.. Installa

A beautiful radar view to show nearby items (users, restaurants, ...) with ripple animation, fully customizable
A beautiful radar view to show nearby items (users, restaurants, ...) with ripple animation, fully customizable

HGRippleRadarView Example To run the example project, clone the repo, and run pod install from the Example directory first. This project is inspired b

A UINavigationBar extension to show loading effects
A UINavigationBar extension to show loading effects

BusyNavigationBar A UINavigationBar extension to show loading effects above navigation bar's background. Screenshot Stripes Bars Your custom layer Usa

SwiftUI  project to show ActivityIndicator above Image while loading
SwiftUI project to show ActivityIndicator above Image while loading

ImageWithActivityIndicatorDemo SwiftUI project to show ActivityIndicator above Image while loading ImageWithActivityIndicatorDemo is a demo app that s

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Features β€’ Guides β€’ Installation β€’ Usage β€’ Miscellaneous β€’ Contributing 🌎 README is available in other languages: πŸ‡ͺπŸ‡Έ . πŸ‡¨πŸ‡³ . πŸ‡§πŸ‡· . πŸ‡°πŸ‡· . πŸ‡«πŸ‡· To

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Features β€’ Guides β€’ Installation β€’ Usage β€’ Miscellaneous β€’ Contributing 🌎 README is available in other languages: πŸ‡ͺπŸ‡Έ . πŸ‡¨πŸ‡³ . πŸ‡§πŸ‡· . πŸ‡°πŸ‡· . πŸ‡«πŸ‡· To

Push notifications allow developers to reach users, even when users aren't actively using an app!
Push notifications allow developers to reach users, even when users aren't actively using an app!

Push notifications allow developers to reach users, even when users aren't actively using an app! With the latest update of iOS Apple provide very useful extensions which are user-friendly. In this tutorial, I am going to share the configuration, set up of Notification with the media attachments like.

πŸŽ‰ WWDC 2021 Swift Student Challenge Winner πŸŽ‰ Dance Party allows users to record choreography and play against other users to try and match the key poses!
πŸŽ‰ WWDC 2021 Swift Student Challenge Winner πŸŽ‰ Dance Party allows users to record choreography and play against other users to try and match the key poses!

πŸ’ƒ Dance Party πŸ•Ί 🍎 WWDC 2021 Swift Student Challenge Winner πŸŽ‰ Installation Steps (Works on iPad Only) Clone or Download Unzip the .playgroundbook.z

Show the confetti only when the user is having fun, and if not having fun, don't show it.
Show the confetti only when the user is having fun, and if not having fun, don't show it.

SPConfetti - A simple solution to show the confetti to the user. Smoothly starts and stops. Allow set multiply diffrent particles at once. You can chang

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Features β€’ Guides β€’ Installation β€’ Usage β€’ Miscellaneous β€’ Contributing 🌎 README is available in other languages: πŸ‡ͺπŸ‡Έ . πŸ‡¨πŸ‡³ . πŸ‡§πŸ‡· . πŸ‡°πŸ‡· . πŸ‡«πŸ‡· To

A MacOS app created to annoy users so users will go to bed during bedtime hours

A MacOS app created to annoy users so users will go to bed during bedtime hours. Developed for me as a school project.

Allows users to pull in new song releases from their favorite artists and provides users with important metrics like their top tracks, top artists, and recently played tracks, queryable by time range.

Spotify Radar Spotify Radar is an iOS application that allows users to pull in new song releases from their favorite artists and provides users with i

Comments
  • Add support for Carthage

    Add support for Carthage

    Hi there, great job on the library, it is quite neat and useful – however I ran into a problem when trying to install it via Carthage.

    Here's the console output:

    $ carthage update --platform iOS
    *** Cloning RHPlaceholder
    *** Checking out RHPlaceholder at "0.0.1"
    *** xcodebuild output can be found in /(…)
    *** Skipped building RHPlaceholder due to the error:
    Dependency "RHPlaceholder" has no shared framework schemes for any of the platforms: iOS
    
    If you believe this to be an error, please file an issue with the maintainers at https://github.com/robertherdzik/RHPlaceholder/issues/new
    

    Possibly the scheme isn't marked as shared?, which is a requirement for Carthage to build the framework.

    Marking an Xcode project scheme as shared

    image Image from Xcode Documentation

    It might be that, but I'm not sure – For now, I'll just add the dependency manually, but it is possible that other people might run into this issue. Other than that, great job again! πŸ‘πŸ»

    enhancement 
    opened by stefanwittwer 3
  • Swift 4.2 update?

    Swift 4.2 update?

    Swift 4.2 update? Some code depreciations need to be updated for swift 4.2 update.

    Also does it work with table view with custom cell loaded from .xib? Its not working for me.

    Thank you

    opened by PrakashMaharjan 2
Releases(0.0.6)
Owner
Robert Herdzik
iOS Developer 🌢
Robert Herdzik
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
A lightweight and awesome loading Activity Indicator for your iOS app.

BPCircleActivityIndicator BPCircleActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on

Ben.Park 46 Aug 12, 2022
A simple and awesome loading Activity Indicator(with block moving animation) for your iOS app.

BPBlockActivityIndicator BPBlockActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on iO

Ben.Park 43 Nov 6, 2021
StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again

StatusBarOverlay will automatically show a "No Internet Connection" bar when your app loses connection, and hide it again. It supports apps which hide the status bar and The Notch

Idle Hands Apps 160 Nov 2, 2022
A number of preset loading indicators created with SwiftUI

A number of preset loading indicators created with SwiftUI

Exyte 968 Jan 8, 2023
NVActivityIndicatorView is a collection of awesome loading animations.

NVActivityIndicatorView is a collection of awesome loading animations.

Vinh Nguyen 10.3k Jan 5, 2023
A metaball loading written in Swift.

DBMetaballLoading Synopsis A metaball loading written in Swift. Special thanks to dodola's MetaballLoading, which is an android project. The animation

ChildhoodAndy 72 Jul 2, 2022
βŒ›οΈA customizable animated gradient loading bar.

GradientLoadingBar A customizable animated gradient loading bar. Inspired by iOS 7 Progress Bar from Codepen. Example To run the example project, clon

Felix M. 791 Dec 26, 2022
Awesome loading animations using 3D engine written with Swift

RSLoadingView Introduction RSLoadingView bring your app to the new age of loading animations using 3D engine. Written with Swift Customizable Using Ap

null 419 Dec 16, 2022
πŸ’€ An easy way to create sliding CAGradientLayer animations! Works great for creating skeleton screens for loading content.

Skeleton is an easy way to create sliding CAGradientLayer animations! It works great for creating skeleton screens: ??‍?? Usage The entire library com

Gonzalo NuΓ±ez 668 Nov 2, 2022