Skip to content

It's a basic loading view in Swift, with error message and Retry button.

License

Notifications You must be signed in to change notification settings

SeptiyanAndika/SAILoadingView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

It's a basic loading view in Swift, with error message and Retry button.

Resources

License

Stars

Watchers

Forks

Packages

No packages published