Latest1.0.0
Homepagehttps://github.com/kokitang/KTLoadingView
LicenseMIT
Platformsios 9.0
DependenciesKTLoadingLabel, NVActivityIndicatorView
FrameworksUIKit
Authors

Version
License
Platform

Banner

Intro

KTLoadingView is a subclass of UIView which embedded KTLoadingLabel and NVActivityIndicator to provide a one-line loading view solution.

Requirements

  • iOS 9.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 8.3+
  • Swift 4

Installation

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

pod 'KTLoadingView'

Example

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

Usage

Basic

import KTLoadingView

KTLoadingView.show()

KTLoadingView

Basic (with text)

import KTLoadingView

KTLoadingView.show(text: "Loading", animateText: "...")

KTLoadingView

Customize

If you want to do some customization. You can get the instance of KTLoadingView

let shared = KTLoadingView.shared

// Customize
shared.type = .pacman
/*And more to discover...*///

shared.show() // or KTLoadingView.show()

You can also customize the KTLoadingLabel by simply set the attributes of it.

let shared = KTLoadingView.shared

// Customize
shared.label.animationType = .reverse
shared.label.stringType = .fullString
shared.label.repeats = false
/*And more to discover...*///

shared.show()

Custom Font

You can set any font to text label as you want. Just set textFont as your dedicated font.

KTLoadingView.shared.textFont = UIFont.systemFont(ofSize: 40)
KTLoadingView.show() // Same as KTLoadingView.shared.show()

If you want to use the font in the sample gif, you can download here.
Or you can find this font file inside /Example/KTLoadingLabel.

Author

Koki Tang

License

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

Latest podspec

{
    "name": "KTLoadingView",
    "version": "1.0.0",
    "summary": "KTLoadingView is a subclass of UIView that provides animated loading page.",
    "description": "KTLoadingView is a nice and easy-to-use library for iOS. It is highly customizable and userfriendly. Works perfectly on anywhere in your app by just one line of code to provide awesome loading view.",
    "homepage": "https://github.com/kokitang/KTLoadingView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "kokitang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kokitang/KTLoadingView.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "KTLoadingView/Classes/**/*",
    "swift_version": "4.0",
    "frameworks": "UIKit",
    "dependencies": {
        "KTLoadingLabel": [],
        "NVActivityIndicatorView": []
    }
}

Pin It on Pinterest

Share This