Loader
  • September 22, 2023

compatible-4BC51D.svg?style=flat-square)

Simple and light weight animated switch activity indicator.

Demo


Installation


CocoaPods


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

pod “SwitchLoader”, ‘~> 0.0.1’

Carthage


carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Loader into your Xcode project using Carthage, specify it in your Cartfile:

github “Ekhoo/Loader” ~> 0.0.1

Run carthage update to build the framework and drag the built Loader.framework into your Xcode project.

Usage


func myFunc() {
let loader: Loader = Loader(frame: CGRectMake(0.0, 0.0, 80.0, 40.0))

self.view.addSubView(loader)

loader.startAnimating()
}

Interface


public func startAnimating() // Animate the switch activity indicator
public func stoptAnimating() // Stop Animating the switch activity indicator

public var loaderColor: UIColor // The background color
public var switchColor: UIColor // The animated switch color

GitHub


View Github

YOU MIGHT ALSO LIKE...
PermissionsSwiftUI: A SwiftUI package to handle permissions

PermissionsSwiftUI displays and handles permissions in SwiftUI. It is largely inspired by SPPermissions. The UI is highly customizable and resembles an Apple style. ...

Pager tab strip view

Introduction PagerTabStripView is the first pager view built in pure SwiftUI. It provides a component to create interactive pager views ...

PageView

SwiftUI view enabling page-based navigation, imitating the behaviour of UIPageViewController in iOS.

Pages

    

How to take action when a property changes

1. Taking Action When a Property Changes: Property Observers Swift lets you observe and respond to changes in a property’s ...