CustomUploadButton 1.0.0

CustomUploadButton 1.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Anand V.



  • By
  • Anand V

CustomUploadButton

Overview

This is a custom upload button that shows animation during the upload action. The user can stop the animation when the upload process is complete. There is also option for disabling/enabling the button.

CustomUploadButton

Requirements

  • Xcode 8.1+
  • iOS 8.0+
  • Swift 3.0+

Installation

Manually:

  • Download CustomUploadButton.
  • Drag and drop CustomUploadButton directory to your project

Example

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

Usage

Here is how you can use CustomUploadButton.

Import CustomUploadButton to your viewcontroller,

import CustomUploadButton

Then create an instance of the CustomUploadButton and set the delegate as follows:

@IBOutlet weak var uploadButton: CustomUploadButton!

uploadButton.delegate = self

Now, implement the CustomUploadButtonActionDelegate function where you can stop the animation when your task is complete:

public func buttonAction(sender: CustomUploadButton) {

    //Your task here

    if sender == uploadButton {
        sender.stopAnimation()
    }
}

Author

Anand V, [email protected]

License

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