SubmitButton is a subclass of UIButton, written in Swift 3. SubmitButton library provide a new catching user interface for a submit button. From now on, anytime the user clicks on the button that involves addressing to the server, they will see the animation that informs them of the progress and completion.
- Custom button color.
- Shows loading indicator.
- Support success, failed and cancelled status.
- Support storyboard customization.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate SubmitButton
into your Xcode project using CocoaPods, specify it in your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod "SubmitButton"
end
Then, run the following command:
$ pod install
- Download SubmitButton.
- Drag and drop SubmitButton directory to your project
To run the example project, clone the repo, and run pod install
from the Example directory first.
- Xcode 7.3+
- iOS 8.0+
- Swift 2.3+
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
Here is how you can use SubmitButton
.
Import SubmitButton to your viewcontroller,
import SubmitButton
- Select button type as 'Custom' in Attributes inspector.
- Use loadingType property to select the button loading type.
- Use Cancel Enable in Attributes inspector or cancelEnabled property to show cancel while loading.
submitButton.loadingType = .timeLimited
submitButton.taskCompletion { (_) in
self.submitButton.completeAnimation(status: .success)
}
Jagajith M Kalarickal, jagajithmk@gmail.com
SubmitButton is available under the MIT license. See the LICENSE file for more info.