Latest 0.2.0
License MIT
Platforms ios 8.0, requires ARC

iOS Buttons that animate while an action is being processed. Written in Swift.


This library was extracted from an iOS application that I was working on at the time. It’s used for any sort of action that is processed asynchronously, and shows a loading-like animation until the action is done.


Basic asynchronous task animation

@IBOutlet weak var btnSignIn: ProcessButton!


// Do some some asynchronous stuff here
// and display result from callback

if callbackSuccess {
  self.btnSignIn.showSuccessText("Success", seconds: ProcessButtonUtil.Length.Short)
} else {
  self.btnSignIn.showErrorText("Error", seconds: ProcessButtonUtil.Length.Long)

Optional To change the colors of the lines and the duration, put this in your AppDelegate didFinishLaunchingWithOptions

// App wide customization
let colors = [UIColor.blueColor(), UIColor.redColor(), UIColor.greenColor()]
let duration: NSTimeInterval = 0.3

  .setColors(colors) // The colors for the animating lines. Can be any number of colors
  .setDuration(duration) // The time for each line to animate. Default is 0.5

Take a look at the project to see a full example.


  • iOS 8 or later
  • Xcode 6 or later


Vidar Ottosson, [email protected]


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

Latest podspec

    "name": "ProcessButton",
    "version": "0.2.0",
    "license": "MIT",
    "homepage": "",
    "authors": {
        "Vidar Ottosson": "[email protected]"
    "summary": "Button that animates while an action is being processed",
    "source": {
        "git": "",
        "tag": "v0.2.0"
    "source_files": "ProcessButton/ProcessButton/*",
    "platforms": {
        "ios": "8.0"
    "requires_arc": true

Pin It on Pinterest

Share This