It's a basic loading view in Swift, with error message and Retry button.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
Preview
SAILoadingView
.gitignore
.travis.yml
LICENSE
README.md
SAILoadingView.podspec

README.md

SAILoadingView

[![CI Status](http://img.shields.io/travis/Septiyan Andika/SAILoadingView.svg?style=flat)](https://travis-ci.org/Septiyan Andika/SAILoadingView) Version License Platform

Preview

Loading View Preview Loading View Error message Error message With Retry Button

Example

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

Installation

  1. Just add SAILoadingView.swift and SAILoadingView.xib file to your project, file are present inside SAILoadingView/Classes directory.

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

pod "SAILoadingView"

Function

 func showLoading(text:String)

Function to show loading view and text progress

 func dismissLoading()

Function to dismiss loading view

 func showError(text:String)

Function to show error message, if Properties onClickRetry not nil or declarede will show button retry, if onClickRetry not declared or nil button retry will be hidden

Properties

public final var onClickRetry: (Void -> Void)?

example :
var loadingView = SAILoadingView(parent: self.view)


loadingView?.onClickRetry = {
            
            self.loadData()
        }
  • show retry button, and handle action when retry button clicked

Author

Septiyan Andika, septiyan.andika@gmail.com

License

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