Swift#5

ButtonAndLabelActivitySpinner 0.1.1

Label and Button that can display activity spinner in place of text to indicate that request is being processed.

Animating.gif

Usage:

Add a label or button and declare its class as For Button: ButtonActivitySpinner For Label: LabelActivitySpinner and Module as ButtonAndLabelActivitySpinner

Screen Shot 2016-09-05 at 2.33.06 PM.png Screen Shot 2016-09-05 at 2.33.20 PM.png

Then in the code while request is being processed, use

Button.startAnimating()
Label.startAnimating()

to start the activity indicator in the center of button of label.

To Stop Animating, Use

Button.stopanimating()
Label.stopanimating()

to stop the activity indicator from animating.

You can also change the color of activityIndicator by

Button.activityIndicator.color = UIColor.blueColor()

Cocoa Pods:

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoa pods

To integrate ButtonAndLableActivitySpinner into your Xcode project using CocoaPods, specify this in your Podfile:

source 'https://reddymk@bitbucket.org/reddymk/buttonandlabelactivityspinner.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'ButtonAndLabelActivitySpinner', '~> 0.1.1'
end

Run the following command:

$ pod install

Link:

https://cocoapods.org/pods/ButtonAndLabelActivitySpinner

https://www.cocoacontrols.com/controls/button-label-spinner

https://github.com/reddymk/buttonandlabelactivityspinner

https://bitbucket.org/reddymk/buttonandlabelactivityspinner

 

Author

Manish Reddy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s