Skip to content

Commit 41f7661

Browse files
Merge pull request #44 from SimformSolutionsPvtLtd/develop
Develop
2 parents cc9c4b8 + 0f31c46 commit 41f7661

File tree

12 files changed

+291
-140
lines changed

12 files changed

+291
-140
lines changed

Package.swift

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// swift-tools-version: 5.7
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "SSSpinnerButton",
8+
platforms: [.iOS(.v11)],
9+
products: [
10+
// Products define the executables and libraries a package produces, and make them visible to other packages.
11+
.library(
12+
name: "SSSpinnerButtonr",
13+
targets: ["SSSpinnerButton"]),
14+
],
15+
dependencies: [
16+
// Dependencies declare other packages that this package depends on.
17+
// .package(url: /* package url */, from: "1.0.0"),
18+
],
19+
targets: [
20+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
21+
// Targets can depend on other targets in this package, and on products in packages this package depends on.
22+
.target(
23+
name: "SSSpinnerButton",
24+
dependencies: [],
25+
path: "SSSpinnerButton")
26+
]
27+
)

README.md

Lines changed: 125 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,125 @@
1-
# SSSpinnerButton
2-
3-
4-
SSSpinnerButton is an elegant button with a different spinner animations.
5-
6-
[![Swift Version][swift-image]][swift-url]
7-
[![Build Status][travis-image]][travis-url]
8-
[![License][license-image]][license-url]
9-
[![Platform][platform-image]][platform-url]
10-
[![PRs Welcome][PR-image]][PR-url]
11-
12-
![Alt text](https://github.com/simformsolutions/SSSpinnerButton/blob/master/SSSpinnerButton.gif?raw=true)
13-
14-
# Features!
15-
- Rounded button when spinner active
16-
- Various spinner animations
17-
- Dynamic spinner size
18-
- Spinner with completion types (Success, fail, error)
19-
- CocoaPods
20-
21-
# Requirements
22-
- iOS 10.0+
23-
- Xcode 9+
24-
25-
# Installation
26-
**CocoaPods**
27-
28-
- You can use CocoaPods to install SSSpinnerButton by adding it to your Podfile:
29-
30-
use_frameworks!
31-
pod 'SSSpinnerButton'
32-
33-
-
34-
import UIKit
35-
import SSSpinnerButton
36-
37-
**Carthage**
38-
39-
Add `github simformsolutions/SSSpinnerButton` to your project's Cartfile
40-
41-
**Manually**
42-
- Download and drop **SSSpinnerButton** folder in your project.
43-
- Congratulations!
44-
45-
# Usage example
46-
47-
- In the storyboard add a UIButton and change its class to SSSpinnerButton
48-
![Alt text](https://github.com/simformsolutions/SSSpinnerButton/blob/master/SpinnerButtonStoryBoard.png?raw=true)
49-
50-
**StartAnimation**
51-
52-
button.startAnimate(spinnerType: SpinnerType.ballClipRotate, spinnercolor: UIColor.red, spinnerSize: 20, complete: {
53-
// Your code here
54-
})
55-
56-
57-
**StopAnimation**
58-
59-
button.stopAnimate(complete: {
60-
// Your code here
61-
})
62-
63-
**StopAnimation with completion types**
64-
65-
button.stopAnimatingWithCompletionType(completionType: .success, complete: {
66-
// Your code here
67-
})
68-
69-
**StopAnimation with completion types and back to defaults**
70-
71-
button.stopAnimationWithCompletionTypeAndBackToDefaults(completionType: .fail, backToDefaults: true, complete: {
72-
// Your code here
73-
})
74-
75-
# Migration
76-
**Version 3.0.1**
77-
- This version requires Xcode 10.2 and Swift 5.0.
78-
79-
**Version 2.0.1**
80-
- This version requires Xcode 10.1 and Swift 4.2.
81-
# Contribute
82-
- We would love you for the contribution to SSspinnerButton, check the LICENSE file for more info.
83-
84-
# Meta
85-
- Distributed under the MIT license. See LICENSE for more information.
86-
87-
88-
# Inspired
89-
- Spinner animations inspired from [NVActivityIndicatorView](https://github.com/ninjaprox/NVActivityIndicatorView)
90-
91-
92-
[swift-image]:https://img.shields.io/badge/swift-5.0-orange.svg
93-
[swift-url]: https://swift.org/
94-
[license-image]: https://img.shields.io/badge/License-MIT-blue.svg
95-
[license-url]: LICENSE
96-
[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square
97-
[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics
98-
[codebeat-image]: https://codebeat.co/assets/svg/badges/C-ffb83f-7198e9a1b7ad7f73977b0c9a5c7c3fffbfa25f262510e5681fd8f5a3188216b0.svg
99-
[codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com
100-
[platform-image]:https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat
101-
[platform-url]:http://cocoapods.org/pods/LFAlertController
102-
[cocoa-image]:https://img.shields.io/cocoapods/v/EZSwiftExtensions.svg
103-
[cocoa-url]:https://img.shields.io/cocoapods/v/LFAlertController.svg
104-
[PR-image]:https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
105-
[PR-url]:http://makeapullrequest.com
1+
# SSSpinnerButton
2+
3+
4+
SSSpinnerButton is a versatile library for iOS developers, written in Swift, that allows you to easily create and customize spinner buttons. With this library, you can add loading spinners to your buttons, providing visual feedback to your users while they wait for a process to complete. The library offers a wide range of customizable options, including spinner color, size as well as button text, font, and background color. SSSpinnerButton is simple to integrate into your existing projects and offers excellent performance, making it an essential tool for any iOS developer looking to enhance their user interface.
5+
6+
[![Swift Version][swift-image]][swift-url]
7+
[![Build Status][travis-image]][travis-url]
8+
[![License][license-image]][license-url]
9+
[![Platform][platform-image]][platform-url]
10+
[![PRs Welcome][PR-image]][PR-url]
11+
12+
![Alt text](https://github.com/simformsolutions/SSSpinnerButton/blob/master/SSSpinnerButton.gif?raw=true)
13+
14+
# Features!
15+
- Rounded button when spz̄inner active
16+
- Various spinner animations
17+
- Dynamic spinner size
18+
- Spinner with completion types (Success, fail, error)
19+
- Spinner with Ripple Effect
20+
- CocoaPods
21+
22+
# Requirements
23+
- iOS 10.0+
24+
- Xcode 9+
25+
26+
# Installation
27+
**CocoaPods**
28+
29+
- You can use CocoaPods to install SSSpinnerButton by adding it to your Podfile:
30+
31+
use_frameworks!
32+
pod 'SSSpinnerButton'
33+
34+
-
35+
import UIKit
36+
import SSSpinnerButton
37+
38+
**Carthage**
39+
40+
- Add `github simformsolutions/SSSpinnerButton` to your project's Cartfile
41+
42+
**Swift Package Manager**
43+
44+
- When using Xcode 11 or later, you can install `SSSpinnerButton` through [Swift Package Manager](https://swift.org/package-manager/) by going to your Project settings > `Swift Packages` and add the repository by providing the GitHub URL. Alternatively, you can go to `File` > `Swift Packages` > `Add Package Dependencies...`
45+
46+
**Manually**
47+
- Download and drop **SSSpinnerButton** folder in your project.
48+
- Congratulations!
49+
50+
# Usage example
51+
52+
- In the storyboard add a UIButton and change its class to SSSpinnerButton
53+
![Alt text](https://github.com/simformsolutions/SSSpinnerButton/blob/master/SpinnerButtonStoryBoard.png?raw=true)
54+
55+
**StartAnimation**
56+
57+
button.startAnimate(spinnerType: SpinnerType.ballClipRotate, spinnercolor: UIColor.red, spinnerSize: 20, complete: {
58+
// Your code here
59+
})
60+
61+
62+
**StopAnimation**
63+
64+
button.stopAnimate(complete: {
65+
// Your code here
66+
})
67+
68+
**StopAnimation with completion types**
69+
70+
button.stopAnimatingWithCompletionType(completionType: .success, complete: {
71+
// Your code here
72+
})
73+
74+
**StopAnimation with completion types and back to defaults**
75+
76+
button.stopAnimationWithCompletionTypeAndBackToDefaults(completionType: .fail, backToDefaults: true, complete: {
77+
// Your code here
78+
})
79+
**To give Default RippleEffect just set this "Set Ripple Effect" value to On**
80+
![Alt text](SpinnerButtonRippleEffect.png)
81+
82+
**To Change the RippleEffect**
83+
84+
button.setRippleEffect(rippleEffectAnimationDuration: Double, initialOpacity: Double, rippleEffectColor: UIColor, rippleEffectPercent: Double, initalRippleEffectPercent: Double)
85+
86+
# Migration
87+
**Version 3.0.1**
88+
- This version requires Xcode 10.2 and Swift 5.0.
89+
90+
**Version 2.0.1**
91+
- This version requires Xcode 10.1 and Swift 4.2.
92+
93+
## 🤝 How to Contribute
94+
95+
Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! :muscle:
96+
97+
Check out our [**Contributing Guide**](CONTRIBUTING.md) for ideas on contributing.
98+
99+
## Find this example useful? ❤️
100+
101+
Give a ⭐️ if this project helped you!
102+
103+
## Check out our other Libraries
104+
105+
<h3><a href="https://github.com/SimformSolutionsPvtLtd/Awesome-Mobile-Libraries"><u>🗂 Simform Solutions Libraries→</u></a></h3>
106+
107+
## MIT License
108+
109+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
110+
111+
112+
[swift-image]:https://img.shields.io/badge/swift-5.0-orange.svg
113+
[swift-url]: https://swift.org/
114+
[license-image]: https://img.shields.io/badge/License-MIT-blue.svg
115+
[license-url]: LICENSE
116+
[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square
117+
[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics
118+
[codebeat-image]: https://codebeat.co/assets/svg/badges/C-ffb83f-7198e9a1b7ad7f73977b0c9a5c7c3fffbfa25f262510e5681fd8f5a3188216b0.svg
119+
[codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com
120+
[platform-image]:https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat
121+
[platform-url]:http://cocoapods.org/pods/LFAlertController
122+
[cocoa-image]:https://img.shields.io/cocoapods/v/EZSwiftExtensions.svg
123+
[cocoa-url]:https://img.shields.io/cocoapods/v/LFAlertController.svg
124+
[PR-image]:https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
125+
[PR-url]:http://makeapullrequest.com

0 commit comments

Comments
 (0)