├── .gitignore ├── .tailor.yml ├── LICENSE ├── Package.swift ├── README.md ├── SSSpinnerButton Demo ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist └── ViewController.swift ├── SSSpinnerButton.gif ├── SSSpinnerButton.podspec ├── SSSpinnerButton.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── Ketan.Chopda.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcshareddata │ └── xcschemes │ │ └── SSSpinnerButton.xcscheme └── xcuserdata │ └── Ketan.Chopda.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── SSSpinnerButton ├── Info.plist ├── SSSpinnerButton.h ├── SpinerShapes │ ├── Extensions.swift │ ├── SpinnerAnimationDelegate │ │ └── SpinnerAnimationDelegate.swift │ ├── SpinnerShapeWithAnimation │ │ ├── SSBallRotateChase.swift │ │ ├── SSBallSpinFadeLoader.swift │ │ ├── SSCircleScaleMultiple.swift │ │ ├── SSCircleStrokeSpin.swift │ │ ├── SSCircleWaveSpin.swift │ │ ├── SSErrorMark.swift │ │ ├── SSFailMark.swift │ │ ├── SSLineSpinFadeLoader.swift │ │ ├── SSPacman.swift │ │ ├── SSSpinnerBallClipRotate.swift │ │ └── SSSuccessMark.swift │ ├── SpinnerTypes.swift │ ├── spinnerLayers.swift │ └── spinnerShape.swift └── SpinnerButton │ └── SSSpinnerButton.swift ├── SpinnerButtonRippleEffect.png ├── SpinnerButtonStoryBoard.png └── docs ├── Classes.html ├── Classes ├── AppDelegate.html ├── SSBallRotateChase.html ├── SSBallSpinFadeLoader.html ├── SSCircleStrokeSpin.html ├── SSErrorMark.html ├── SSFailMark.html ├── SSLineSpinFadeLoader.html ├── SSSpinnerBallClipRotate.html ├── SSSpinnerButton.html ├── SSSuccessMark.html └── ViewController.html ├── Enums.html ├── Enums ├── CheckMarkShape.html ├── CompletionType.html ├── SpinnerShape.html └── SpinnerType.html ├── Extensions.html ├── Extensions ├── CAGradientLayer.html └── FloatingPoint.html ├── Protocols.html ├── Protocols └── SSSpinnerAnimationDelegate.html ├── badge.svg ├── css ├── highlight.css └── jazzy.css ├── docsets ├── .docset │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ ├── Documents │ │ ├── Classes.html │ │ ├── Classes │ │ │ ├── AppDelegate.html │ │ │ ├── SSBallRotateChase.html │ │ │ ├── SSBallSpinFadeLoader.html │ │ │ ├── SSCircleStrokeSpin.html │ │ │ ├── SSLineSpinFadeLoader.html │ │ │ ├── SSSpinnerBallClipRotate.html │ │ │ ├── SSSpinnerButton.html │ │ │ └── ViewController.html │ │ ├── Enums.html │ │ ├── Enums │ │ │ ├── SpinnerShape.html │ │ │ └── SpinnerType.html │ │ ├── Extensions.html │ │ ├── Extensions │ │ │ └── CAGradientLayer.html │ │ ├── Protocols.html │ │ ├── Protocols │ │ │ └── SSSpinnerAnimationDelegate.html │ │ ├── badge.svg │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ ├── img │ │ │ ├── carat.png │ │ │ ├── dash.png │ │ │ └── gh.png │ │ ├── index.html │ │ ├── js │ │ │ ├── jazzy.js │ │ │ └── jquery.min.js │ │ ├── search.json │ │ └── undocumented.json │ │ └── docSet.dsidx ├── .tgz ├── SSSpinnerButton 2.docset │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ ├── Documents │ │ ├── Classes.html │ │ ├── Classes │ │ │ ├── AppDelegate.html │ │ │ ├── SSBallRotateChase.html │ │ │ ├── SSBallSpinFadeLoader.html │ │ │ ├── SSCircleStrokeSpin.html │ │ │ ├── SSErrorMark.html │ │ │ ├── SSFailMark.html │ │ │ ├── SSLineSpinFadeLoader.html │ │ │ ├── SSSpinnerBallClipRotate.html │ │ │ ├── SSSpinnerButton.html │ │ │ ├── SSSuccessMark.html │ │ │ └── ViewController.html │ │ ├── Enums.html │ │ ├── Enums │ │ │ ├── CheckMarkShape.html │ │ │ ├── CompletionType.html │ │ │ ├── SpinnerShape.html │ │ │ └── SpinnerType.html │ │ ├── Extensions.html │ │ ├── Extensions │ │ │ ├── CAGradientLayer.html │ │ │ └── FloatingPoint.html │ │ ├── Protocols.html │ │ ├── Protocols │ │ │ └── SSSpinnerAnimationDelegate.html │ │ ├── badge.svg │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ ├── img │ │ │ ├── carat.png │ │ │ ├── dash.png │ │ │ └── gh.png │ │ ├── index.html │ │ ├── js │ │ │ ├── jazzy.js │ │ │ └── jquery.min.js │ │ ├── search.json │ │ └── undocumented.json │ │ └── docSet.dsidx ├── SSSpinnerButton.docset │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ ├── Documents │ │ ├── Classes.html │ │ ├── Classes │ │ │ ├── AppDelegate.html │ │ │ ├── SSBallRotateChase.html │ │ │ ├── SSBallSpinFadeLoader.html │ │ │ ├── SSCircleStrokeSpin.html │ │ │ ├── SSErrorMark.html │ │ │ ├── SSFailMark.html │ │ │ ├── SSLineSpinFadeLoader.html │ │ │ ├── SSSpinnerBallClipRotate.html │ │ │ ├── SSSpinnerButton.html │ │ │ ├── SSSuccessMark.html │ │ │ └── ViewController.html │ │ ├── Enums.html │ │ ├── Enums │ │ │ ├── CheckMarkShape.html │ │ │ ├── CompletionType.html │ │ │ ├── SpinnerShape.html │ │ │ └── SpinnerType.html │ │ ├── Extensions.html │ │ ├── Extensions │ │ │ ├── CAGradientLayer.html │ │ │ └── FloatingPoint.html │ │ ├── Protocols.html │ │ ├── Protocols │ │ │ └── SSSpinnerAnimationDelegate.html │ │ ├── badge.svg │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ ├── img │ │ │ ├── carat.png │ │ │ ├── dash.png │ │ │ └── gh.png │ │ ├── index.html │ │ ├── js │ │ │ ├── jazzy.js │ │ │ └── jquery.min.js │ │ ├── search.json │ │ └── undocumented.json │ │ └── docSet.dsidx ├── SSSpinnerButton.tgz ├── SSSpinnerButtons.docset │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ ├── Documents │ │ ├── Classes.html │ │ ├── Classes │ │ │ ├── AppDelegate.html │ │ │ ├── SSBallRotateChase.html │ │ │ ├── SSBallSpinFadeLoader.html │ │ │ ├── SSCircleStrokeSpin.html │ │ │ ├── SSLineSpinFadeLoader.html │ │ │ ├── SSSpinnerBallClipRotate.html │ │ │ ├── SSSpinnerButton.html │ │ │ └── ViewController.html │ │ ├── Enums.html │ │ ├── Enums │ │ │ ├── SpinnerShape.html │ │ │ └── SpinnerType.html │ │ ├── Extensions.html │ │ ├── Extensions │ │ │ └── CAGradientLayer.html │ │ ├── Protocols.html │ │ ├── Protocols │ │ │ └── SSSpinnerAnimationDelegate.html │ │ ├── badge.svg │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ ├── img │ │ │ ├── carat.png │ │ │ ├── dash.png │ │ │ └── gh.png │ │ ├── index.html │ │ ├── js │ │ │ ├── jazzy.js │ │ │ └── jquery.min.js │ │ ├── search.json │ │ └── undocumented.json │ │ └── docSet.dsidx └── SSSpinnerButtons.tgz ├── img ├── carat.png ├── dash.png └── gh.png ├── index.html ├── js ├── jazzy.js └── jquery.min.js ├── search.json └── undocumented.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | 19 | ## Other 20 | *.moved-aside 21 | *.xccheckout 22 | *.xcscmblueprint 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | # Package.pins 39 | # Package.resolved 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots/**/*.png 67 | fastlane/test_output 68 | -------------------------------------------------------------------------------- /.tailor.yml: -------------------------------------------------------------------------------- 1 | # Name the file as below - will be hidden by nature 2 | # .tailor.yml 3 | # Rules reference - https://github.com/sleekbyte/tailor/wiki/Rules#constant-naming 4 | 5 | 6 | # // tailor:off 7 | # swift code - multiline 8 | # // tailor:on 9 | 10 | # single line // tailor:disable 11 | 12 | 13 | include: 14 | - SSSpinnerButton # Inspect all Swift files under "Spinner/" 15 | 16 | exclude: 17 | 18 | only: 19 | # class, enum, struct, and protocol names should follow UpperCamelCase naming convention : several words are joined together, and the first letter of every word is capitalized 20 | - upper-camel-case 21 | # method, var, and enum value names should follow lowerCamelCase naming convention: first letter of the entire word is lowercase, but subsequent first letters are uppercase. 22 | - lower-camel-case 23 | # Global constants should follow either UpperCamelCase or lowerCamelCase naming conventions. Local constants should follow lowerCamelCase naming conventions. 24 | - constant-naming 25 | # Prefer a single space before and after '->'. 26 | - arrow-whitespace 27 | # There should be no whitespace immediately before/after an opening chevron < and before the closing chevron >. 28 | - angle-bracket-whitespace 29 | # There should be no whitespace preceding the colon, exactly one whitespace after the colon for: var, class, struct, protocol, extension, func, and tuple declarations, dict literals and types & case statements 30 | - colon-whitespace 31 | # Prefer no spaces before and exactly one space after a comma (',') in the following structures: Identifier Lists, Switch Case Item Lists, Parameter Lists, Enum Case Lists, Array Literal Items 32 | - comma-whitespace 33 | # Prefer single space around operator in operator declarations. 34 | - operator-whitespace 35 | # Swift source files should terminate with exactly 1 \n character, not 0 nor more than 1. 36 | - terminating-newline 37 | # There should be no whitespace immediately before/after an opening parenthesis ( and before the closing parenthesis ). 38 | # NOT SUPPORTED - parentheses-whitespace 39 | # Flag whitespace after the last non-whitespace character on each line until the newline. 40 | # - trailing-whitespace 41 | # Prefer at least one whitespace character after a comment opening symbol (//, ///, /*, or /**) and at least one whitespace character before a comment closing symbol (*/). 42 | - comment-whitespace 43 | # Every function and method declaration should have one blank line before and after itself. An exception to this rule are functions that are declared at the start of a file (only need one blank line after their declaration) or at the end of a file (only need one blank line before their declaration). 44 | - function-whitespace 45 | # Enforce a line limit on the lengths of class bodies. 46 | # NOT SUPPORTED - max-class-length 1000 47 | # Enforce a line limit on the lengths of closure bodies. 48 | # NOT SUPPORTED - max-closure-length 100 49 | # Enforce a line limit on the lengths of function bodies. 50 | # NOT SUPPORTED - max-function-length 100 51 | # Enforce a character limit on the length of each line. 52 | # NOT SUPPORTED - max-line-length 1000 53 | # Enforce a character limit on the maximum length of each construct name for classes, enums, enumcases, structs, protocols, elements, functions, labels, setters, typealiases, types, variables, and constants. 54 | # NOT SUPPORTED - max-name-length 100 55 | # Enforce a character limit on the minimum length of each construct name for classes, enums, enumcases, structs, protocols, elements, functions, labels, setters, typealiases, types, variables, and constants. 56 | # NOT SUPPORTED - min-name-length 5 57 | # should follow the One True Brace Style (1TBS) 58 | - brace-style 59 | # NEVER DISABLE - void using the forced form of the type cast operator (as!) because Swift is not able to determine at compile time if the type conversion will succeed. 60 | - forced-type-cast 61 | # Multiple import statements should not be defined on a single line. 62 | - multiple-imports 63 | # NEVER DISABLE - TODO comments should be defined separately using non-nested single line comments. They should adhere to the or syntax. 64 | - todo-syntax 65 | # Optional binding lists should not have consecutive var/let bindings. All constants must be preceded by at most one let binding. All variables must be preceded by only one var binding. 66 | # NOT SUPPORTED - redundant-optional-binding 67 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Simform 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 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: "SSSpinnerButton", 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 | ) 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 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 | [![License][license-image]][license-url] 8 | [![Platform][platform-image]][platform-url] 9 | [![PRs Welcome][PR-image]][PR-url] 10 | 11 | ![Alt text](https://github.com/simformsolutions/SSSpinnerButton/blob/master/SSSpinnerButton.gif?raw=true) 12 | 13 | # Features! 14 | - Rounded button when spz̄inner active 15 | - Various spinner animations 16 | - Dynamic spinner size 17 | - Spinner with completion types (Success, fail, error) 18 | - Spinner with Ripple Effect 19 | - CocoaPods 20 | 21 | # Requirements 22 | - iOS 10.0+ 23 | - Xcode 9+ 24 | > **Are looking for swiftUI? Try [SSSwiftUISpinnerButton](https://github.com/SimformSolutionsPvtLtd/SSSwiftUISpinnerButton) for a more conventional set of APIs.** 25 | 26 | 27 | # Installation 28 | **CocoaPods** 29 | 30 | - You can use CocoaPods to install SSSpinnerButton by adding it to your Podfile: 31 | 32 | use_frameworks! 33 | pod 'SSSpinnerButton' 34 | 35 | - 36 | import UIKit 37 | import SSSpinnerButton 38 | 39 | **Carthage** 40 | 41 | - Add `github simformsolutions/SSSpinnerButton` to your project's Cartfile 42 | 43 | **Swift Package Manager** 44 | 45 | - 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...` 46 | 47 | **Manually** 48 | - Download and drop **SSSpinnerButton** folder in your project. 49 | - Congratulations! 50 | 51 | # Usage example 52 | 53 | - In the storyboard add a UIButton and change its class to SSSpinnerButton 54 | ![Alt text](https://github.com/simformsolutions/SSSpinnerButton/blob/master/SpinnerButtonStoryBoard.png?raw=true) 55 | 56 | **StartAnimation** 57 | 58 | button.startAnimate(spinnerType: SpinnerType.ballClipRotate, spinnercolor: UIColor.red, spinnerSize: 20, complete: { 59 | // Your code here 60 | }) 61 | 62 | 63 | **StopAnimation** 64 | 65 | button.stopAnimate(complete: { 66 | // Your code here 67 | }) 68 | 69 | **StopAnimation with completion types** 70 | 71 | button.stopAnimatingWithCompletionType(completionType: .success, complete: { 72 | // Your code here 73 | }) 74 | 75 | **StopAnimation with completion types and back to defaults** 76 | 77 | button.stopAnimationWithCompletionTypeAndBackToDefaults(completionType: .fail, backToDefaults: true, complete: { 78 | // Your code here 79 | }) 80 | **To give Default RippleEffect just set this "Set Ripple Effect" value to On** 81 | ![Alt text](SpinnerButtonRippleEffect.png) 82 | 83 | **To Change the RippleEffect** 84 | 85 | button.setRippleEffect(rippleEffectAnimationDuration: Double, initialOpacity: Double, rippleEffectColor: UIColor, rippleEffectPercent: Double, initialRippleEffectPercent: Double) 86 | 87 | # Migration 88 | **Version 3.0.1** 89 | - This version requires Xcode 10.2 and Swift 5.0. 90 | 91 | **Version 2.0.1** 92 | - This version requires Xcode 10.1 and Swift 4.2. 93 | 94 | ## 🤝 How to Contribute 95 | 96 | Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! :muscle: 97 | 98 | Check out our [**Contributing Guide**](CONTRIBUTING.md) for ideas on contributing. 99 | 100 | ## Find this example useful? ❤️ 101 | 102 | Give a ⭐️ if this project helped you! 103 | 104 | ## Check out our other Libraries 105 | 106 |

🗂 Simform Solutions Libraries→

107 | 108 | ## MIT License 109 | 110 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details 111 | 112 | 113 | [swift-image]:https://img.shields.io/badge/swift-5.0-orange.svg 114 | [swift-url]: https://swift.org/ 115 | [license-image]: https://img.shields.io/badge/License-MIT-blue.svg 116 | [license-url]: LICENSE 117 | [travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square 118 | [travis-url]: https://travis-ci.org/dbader/node-datadog-metrics 119 | [codebeat-image]: https://codebeat.co/assets/svg/badges/C-ffb83f-7198e9a1b7ad7f73977b0c9a5c7c3fffbfa25f262510e5681fd8f5a3188216b0.svg 120 | [codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com 121 | [platform-image]:https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat 122 | [platform-url]:http://cocoapods.org/pods/LFAlertController 123 | [cocoa-image]:https://img.shields.io/cocoapods/v/EZSwiftExtensions.svg 124 | [cocoa-url]:https://img.shields.io/cocoapods/v/LFAlertController.svg 125 | [PR-image]:https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square 126 | [PR-url]:http://makeapullrequest.com 127 | -------------------------------------------------------------------------------- /SSSpinnerButton Demo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 05/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | -------------------------------------------------------------------------------- /SSSpinnerButton Demo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /SSSpinnerButton Demo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SSSpinnerButton Demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | UILaunchStoryboardName 22 | LaunchScreen 23 | UIMainStoryboardFile 24 | Main 25 | 26 | 27 | -------------------------------------------------------------------------------- /SSSpinnerButton Demo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 05/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SSSpinnerButton 11 | 12 | class ViewController: UIViewController { 13 | 14 | // MARK: Outlets 15 | @IBOutlet weak var btnClipRotate: SSSpinnerButton! 16 | @IBOutlet weak var btnSpinFade: SSSpinnerButton! 17 | @IBOutlet weak var btnLineSpinFade: SSSpinnerButton! 18 | @IBOutlet weak var btnBallRotateChase: SSSpinnerButton! 19 | @IBOutlet weak var btnCircleStrokeSpin: SSSpinnerButton! 20 | @IBOutlet weak var btnRippleEffect: SSSpinnerButton! 21 | 22 | override func viewDidLoad() { 23 | super.viewDidLoad() 24 | btnRippleEffect.setRippleEffect(rippleEffectAnimationDuration: 0.3, initialOpacity: 0.5, rippleEffectColor: .black, rippleEffectPercent: 0.45, initialRippleEffectPercent: 0.3) 25 | // Do any additional setup after loading the view, typically from a nib. 26 | } 27 | 28 | override func didReceiveMemoryWarning() { 29 | super.didReceiveMemoryWarning() 30 | // Dispose of any resources that can be recreated. 31 | } 32 | 33 | @IBAction func onSpinnnerButtonClick(_ sender: SSSpinnerButton) { 34 | let arr: [SpinnerType] = [.ballClipRotate, .ballSpinFade, .lineSpinFade, .ballRotateChase, .circleStrokeSpin, .ballClipRotate, .ballSpinFade, .lineSpinFade, .ballRotateChase, .pacman, .circleScaleMultiple, .circleWaveSpin] 35 | 36 | // MARK: Start Animating 37 | sender.startAnimate(spinnerType: arr[sender.tag], spinnercolor: .white, spinnerSize: 20, complete: nil) 38 | Timer.scheduledTimer(withTimeInterval: 5, repeats: false) { (_) in 39 | if sender.tag == 5 { 40 | // MARK: Stop Animating with completion type and back to default 41 | // MARK: completion type is fail 42 | sender.stopAnimatingWithCompletionType(completionType: .fail, complete: { 43 | // Your completion actions 44 | }) 45 | return 46 | } 47 | if sender.tag == 6 { 48 | // MARK: Stop Animating with completion type and back to default 49 | // MARK: completion type is fail 50 | sender.stopAnimationWithCompletionTypeAndBackToDefaults(completionType: .fail, backToDefaults: true, complete: { 51 | // Your completion actions 52 | }) 53 | return 54 | } 55 | if sender.tag == 7 { 56 | // MARK: Stop animating with completion type 57 | // MARK: completion type is success 58 | sender.stopAnimatingWithCompletionType(completionType: .success, complete: nil) 59 | return 60 | } 61 | if sender.tag == 8 { 62 | // MARK: Stop animating with completion type 63 | // MARK: completion type is error 64 | sender.stopAnimatingWithCompletionType(completionType: .error, complete: nil) 65 | return 66 | } 67 | // MARK: Stop animating without completion 68 | sender.stopAnimate(complete: { 69 | // Your completion actions 70 | }) 71 | 72 | } 73 | 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /SSSpinnerButton.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/SSSpinnerButton.gif -------------------------------------------------------------------------------- /SSSpinnerButton.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint SSSpinnerButton.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = "SSSpinnerButton" 11 | s.version = "3.2.1" 12 | s.summary = "SSSpinnerButton is an elegant button with a different spinner animations." 13 | 14 | #s.description = "SSSpinnerButton is an elegant button with a different spinner animations." 15 | 16 | s.homepage = 'https://github.com/simformsolutions/SSSpinnerButton.git' 17 | 18 | #s.license = "MIT" 19 | s.license = { :type => 'MIT', :file => 'LICENSE' } 20 | 21 | s.author = { "Bhargav Bajani" => "bhargav.b@simformsolutions.com" } 22 | s.platform = :ios 23 | 24 | s.ios.deployment_target = "10.0" 25 | s.swift_version = '5.0' 26 | 27 | s.source = { :git => "https://github.com/simformsolutions/SSSpinnerButton.git", :tag => "#{s.version}" } 28 | #s.source = { :path => ".", :tag => "#{s.version}" } 29 | 30 | s.source_files = 'SSSpinnerButton/**/*.swift' 31 | #s.pod_target_xcconfig = { 'SWIFT_VERSION' => '5.0' } 32 | s.documentation_url = 'docs/index.html' 33 | 34 | end 35 | -------------------------------------------------------------------------------- /SSSpinnerButton.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SSSpinnerButton.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SSSpinnerButton.xcodeproj/project.xcworkspace/xcuserdata/Ketan.Chopda.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/SSSpinnerButton.xcodeproj/project.xcworkspace/xcuserdata/Ketan.Chopda.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SSSpinnerButton.xcodeproj/xcshareddata/xcschemes/SSSpinnerButton.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /SSSpinnerButton.xcodeproj/xcuserdata/Ketan.Chopda.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SSSpinnerButton.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SSSpinnerButton/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | UILaunchStoryboardName 22 | LaunchScreen 23 | UIMainStoryboardFile 24 | Main 25 | UIRequiresFullScreen 26 | 27 | UISupportedInterfaceOrientations 28 | 29 | UIInterfaceOrientationLandscapeLeft 30 | UIInterfaceOrientationLandscapeRight 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationPortraitUpsideDown 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /SSSpinnerButton/SSSpinnerButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // SSSpinnerButton.h 3 | // SSSpinnerButton 4 | // 5 | // Created by Eric on 2019-05-30. 6 | // Copyright © 2019 Simform Solutions. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SSSpinnerButton. 12 | FOUNDATION_EXPORT double SSSpinnerButtonVersionNumber; 13 | 14 | //! Project version string for SSSpinnerButton. 15 | FOUNDATION_EXPORT const unsigned char SSSpinnerButtonVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Extensions.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Ketan Chopda on 30/08/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // MARK: - return angle to degree/ radians 12 | extension FloatingPoint { 13 | var toRadians: Self { return self * .pi / 180 } 14 | var toDegree: Self { return self * 180 / .pi } 15 | } 16 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerAnimationDelegate/SpinnerAnimationDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SpinnerAnimationDelegate.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 01/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /// 13 | protocol SSSpinnerAnimationDelegate: AnyObject { 14 | 15 | /// setup spinner layer 16 | /// 17 | /// - Parameters: 18 | /// - layer: layer Parent layer (Button layer) 19 | /// - frame: frame of parant layer 20 | /// - color: color of spinner 21 | /// - spinnerSize: size of spinner layer 22 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) 23 | 24 | } 25 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSBallRotateChase.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSBallRotateChase.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 01/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | /// 12 | class SSBallRotateChase: SSSpinnerAnimationDelegate { 13 | 14 | /// setup spinner layer 15 | /// 16 | /// - Parameters: 17 | /// - layer: layer Parent layer (Button layer) 18 | /// - frame: frame of parant layer 19 | /// - color: color of spinner 20 | /// - spinnerSize: size of spinner layer 21 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 22 | 23 | var defaultPadding: CGFloat = 10.0 24 | var sizeofSpinner: CGFloat? 25 | if spinnerSize != nil { 26 | defaultPadding = 0.0 27 | sizeofSpinner = max(CGFloat(spinnerSize!) - defaultPadding, 1.0) 28 | } 29 | var size = max(min(frame.width, frame.height) - defaultPadding, 1.0) 30 | if sizeofSpinner != nil && sizeofSpinner! > (size - defaultPadding) { 31 | defaultPadding = 10.0 32 | size = max(min(frame.width, frame.height) - defaultPadding, 1.0) 33 | sizeofSpinner = size 34 | } 35 | 36 | let center = CGPoint(x: (size/2) + (defaultPadding / 2), y: (size / 2) + (defaultPadding / 2)) 37 | let circleSize = sizeofSpinner != nil ? max(min(sizeofSpinner! / 6, size / 6), 1.0) : size / 6 38 | 39 | for i in 0 ..< 5 { 40 | let factor = Float(i) * 1 / 5 41 | let circle = SpinnerShape.circle.layerWith(size: CGSize(width: circleSize, height: circleSize), color: color) 42 | let animation = rotateAnimation(factor, x: center.x, y: center.y, size: CGSize(width: (sizeofSpinner != nil ? sizeofSpinner! : size) - circleSize, height: (sizeofSpinner != nil ? sizeofSpinner! : size) - circleSize)) 43 | 44 | circle.frame = CGRect(x: 0, y: 0, width: circleSize, height: circleSize) 45 | circle.add(animation, forKey: "animation") 46 | layer.addSublayer(circle) 47 | } 48 | 49 | } 50 | 51 | 52 | /// Rotate animation 53 | /// 54 | /// - Parameters: 55 | /// - rate: rate of rotation 56 | /// - x: X value of center 57 | /// - y: Y value of center 58 | /// - size: size of spinner 59 | /// - Returns: Rotate Animation group 60 | func rotateAnimation(_ rate: Float, x: CGFloat, y: CGFloat, size: CGSize) -> CAAnimationGroup { 61 | let duration: CFTimeInterval = 1.5 62 | let fromScale = 1 - rate 63 | let toScale = 0.2 + rate 64 | let timeFunc = CAMediaTimingFunction(controlPoints: 0.5, 0.15 + rate, 0.25, 1) 65 | 66 | // Scale animation 67 | let scaleAnimation = CABasicAnimation(keyPath: "transform.scale") 68 | scaleAnimation.duration = duration 69 | scaleAnimation.repeatCount = HUGE 70 | scaleAnimation.fromValue = fromScale 71 | scaleAnimation.toValue = toScale 72 | 73 | // Position animation 74 | let positionAnimation = CAKeyframeAnimation(keyPath: "position") 75 | positionAnimation.duration = duration 76 | positionAnimation.repeatCount = HUGE 77 | positionAnimation.path = UIBezierPath(arcCenter: CGPoint(x: x, y: y), radius: size.width / 2, startAngle: CGFloat(3 * Double.pi * 0.5), endAngle: CGFloat(3 * Double.pi * 0.5 + 2 * Double.pi), clockwise: true).cgPath 78 | 79 | // Animation 80 | let animation = CAAnimationGroup() 81 | animation.animations = [scaleAnimation, positionAnimation] 82 | animation.timingFunction = timeFunc 83 | animation.duration = duration 84 | animation.repeatCount = HUGE 85 | animation.isRemovedOnCompletion = false 86 | 87 | return animation 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSBallSpinFadeLoader.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSBallSpinFadeLoader2.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 01/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /// 13 | class SSBallSpinFadeLoader: SSSpinnerAnimationDelegate { 14 | 15 | /// setup spinner layer 16 | /// 17 | /// - Parameters: 18 | /// - layer: layer Parent layer (Button layer) 19 | /// - frame: frame of parant layer 20 | /// - color: color of spinner 21 | /// - spinnerSize: size of spinner layer 22 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 23 | 24 | let defaultPadding: CGFloat = 10.0 25 | let sizeValue = min(frame.width, frame.height) 26 | var sizeOfSpinner = max(sizeValue - (defaultPadding), 1.0) 27 | if spinnerSize != nil { 28 | sizeOfSpinner = max(min(CGFloat(spinnerSize!), sizeOfSpinner), 1.0) 29 | } 30 | let center = CGPoint(x: (sizeValue / 2), y: (sizeValue / 2)) 31 | let circleSpacing: CGFloat = 1 32 | let circleSize = max((sizeOfSpinner * circleSpacing / 8), 1.0) 33 | 34 | let duration: CFTimeInterval = 1 35 | let beginTime = CACurrentMediaTime() 36 | let beginTimes: [CFTimeInterval] = [0, 0.12, 0.24, 0.36, 0.48, 0.6, 0.72, 0.84] 37 | 38 | // Scale animation 39 | let scaleAnimation = CAKeyframeAnimation(keyPath: "transform.scale") 40 | 41 | scaleAnimation.keyTimes = [0, 0.5, 1] 42 | scaleAnimation.values = [1, 0.4, 1] 43 | scaleAnimation.duration = duration 44 | 45 | // Opacity animation 46 | let opacityAnimation = CAKeyframeAnimation(keyPath: "opacity") 47 | 48 | opacityAnimation.keyTimes = [0, 0.5, 1] 49 | opacityAnimation.values = [1, 0.3, 1] 50 | opacityAnimation.duration = duration 51 | 52 | // Animation 53 | let animation = CAAnimationGroup() 54 | 55 | animation.animations = [scaleAnimation, opacityAnimation] 56 | animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear) 57 | animation.duration = duration 58 | animation.repeatCount = HUGE 59 | animation.isRemovedOnCompletion = false 60 | 61 | for i in 0 ..< 8 { 62 | let circle = circleAt(angle: CGFloat(Double.pi / 4) * CGFloat(i), 63 | size: circleSize, 64 | origin: center, 65 | containerSize: CGSize(width: sizeOfSpinner, height: sizeOfSpinner), 66 | color: color) 67 | 68 | animation.beginTime = beginTime + beginTimes[i] 69 | circle.add(animation, forKey: "animation") 70 | layer.addSublayer(circle) 71 | } 72 | 73 | } 74 | 75 | 76 | /// layer of Circle 77 | /// 78 | /// - Parameters: 79 | /// - angle: position angle of circle 80 | /// - size: size of spinner 81 | /// - origin: center of spinner 82 | /// - containerSize: 83 | /// - color: spinner color 84 | /// - Returns: 85 | func circleAt(angle: CGFloat, size: CGFloat, origin: CGPoint, containerSize: CGSize, color: UIColor) -> CALayer { 86 | let radius = (containerSize.width / 2) - (size / 2) 87 | let circle = SpinnerShape.circle.layerWith(size: CGSize(width: size, height: size), color: color) 88 | let frame = CGRect( 89 | x: origin.x + radius * (cos(angle)) - (size / 2), 90 | y: origin.y + radius * (sin(angle)) - (size / 2), 91 | width: size, 92 | height: size) 93 | 94 | circle.frame = frame 95 | 96 | return circle 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSCircleScaleMultiple.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSCirclePulse.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Pranay Patel on 16/04/21. 6 | // Copyright © 2021 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | import QuartzCore 12 | 13 | class SSCircleScaleMultiple: SSSpinnerAnimationDelegate { 14 | 15 | /// setup spinner layer 16 | /// 17 | /// - Parameters: 18 | /// - layer: layer Parent layer (Button layer) 19 | /// - frame: frame of parant layer 20 | /// - color: color of spinner 21 | /// - spinnerSize: size of spinner layer 22 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 23 | let sizeValue = min(frame.width, frame.height) 24 | let center = CGPoint(x: 0, y: 0) 25 | let duration: CFTimeInterval = 1 26 | let beginTime = CACurrentMediaTime() 27 | let beginTimes = [0, 0.2, 0.4] 28 | 29 | // Scale animation 30 | let scaleAnimation = CABasicAnimation(keyPath: "transform.scale") 31 | 32 | scaleAnimation.duration = duration 33 | scaleAnimation.fromValue = 0 34 | scaleAnimation.toValue = 1 35 | 36 | // Opacity animation 37 | let opacityAnimation = CAKeyframeAnimation(keyPath: "opacity") 38 | opacityAnimation.duration = duration 39 | opacityAnimation.keyTimes = [0, 0.05, 1] 40 | opacityAnimation.values = [0, 1, 0] 41 | 42 | // Animation 43 | let animation = CAAnimationGroup() 44 | 45 | animation.animations = [scaleAnimation, opacityAnimation] 46 | animation.timingFunction = CAMediaTimingFunction(name: .linear) 47 | animation.duration = duration 48 | animation.repeatCount = HUGE 49 | animation.isRemovedOnCompletion = false 50 | 51 | // Draw balls 52 | for i in 0 ..< 3 { 53 | let circle = SpinnerShape.circle.layerWith(size: CGSize(width: sizeValue, height: sizeValue), color: color) 54 | let frame = CGRect(x: center.x, y: center.y, width: sizeValue, height: sizeValue) 55 | animation.beginTime = beginTime + beginTimes[i] 56 | circle.frame = frame 57 | circle.opacity = 0 58 | circle.add(animation, forKey: "animation") 59 | layer.addSublayer(circle) 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSCircleStrokeSpin.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSCircleStrokeSpin.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 01/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /// 13 | class SSCircleStrokeSpin: SSSpinnerAnimationDelegate { 14 | 15 | /// setup spinner layer 16 | /// 17 | /// - Parameters: 18 | /// - layer: layer Parent layer (Button layer) 19 | /// - frame: frame of parant layer 20 | /// - color: color of spinner 21 | /// - spinnerSize: size of spinner layer 22 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 23 | 24 | let defaultPadding: CGFloat = 10.0 25 | var center = CGPoint(x: defaultPadding / 2, y: defaultPadding / 2) 26 | var sizeValue = max(min(frame.width, frame.height) - defaultPadding, 1.0) 27 | if spinnerSize != nil && CGFloat(spinnerSize!) < sizeValue { 28 | sizeValue = max(CGFloat(spinnerSize!), 1.0) 29 | center = CGPoint(x: frame.height / 2 - sizeValue / 2, y: frame.height / 2 - sizeValue / 2) 30 | } 31 | let beginTime: Double = 0.5 32 | let strokeStartDuration: Double = 1.2 33 | let strokeEndDuration: Double = 0.7 34 | 35 | let rotationAnimation = CABasicAnimation(keyPath: "transform.rotation") 36 | rotationAnimation.byValue = Float.pi * 2 37 | rotationAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear) 38 | 39 | let strokeEndAnimation = CABasicAnimation(keyPath: "strokeEnd") 40 | strokeEndAnimation.duration = strokeEndDuration 41 | strokeEndAnimation.timingFunction = CAMediaTimingFunction(controlPoints: 0.4, 0.0, 0.2, 1.0) 42 | strokeEndAnimation.fromValue = 0 43 | strokeEndAnimation.toValue = 1 44 | 45 | let strokeStartAnimation = CABasicAnimation(keyPath: "strokeStart") 46 | strokeStartAnimation.duration = strokeStartDuration 47 | strokeStartAnimation.timingFunction = CAMediaTimingFunction(controlPoints: 0.4, 0.0, 0.2, 1.0) 48 | strokeStartAnimation.fromValue = 0 49 | strokeStartAnimation.toValue = 1 50 | strokeStartAnimation.beginTime = beginTime 51 | 52 | let groupAnimation = CAAnimationGroup() 53 | groupAnimation.animations = [rotationAnimation, strokeEndAnimation, strokeStartAnimation] 54 | groupAnimation.duration = strokeStartDuration + beginTime 55 | groupAnimation.repeatCount = .infinity 56 | groupAnimation.isRemovedOnCompletion = false 57 | groupAnimation.fillMode = CAMediaTimingFillMode.forwards 58 | 59 | let circle = SpinnerShape.stroke.layerWith(size: CGSize(width: sizeValue, height: sizeValue), color: color) 60 | let frame = CGRect( 61 | x: center.x, 62 | y: center.y, 63 | width: sizeValue, 64 | height: sizeValue 65 | ) 66 | 67 | circle.frame = frame 68 | circle.add(groupAnimation, forKey: "animation") 69 | layer.addSublayer(circle) 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSCircleWaveSpin.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSCircleWave.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Pranay Patel on 16/04/21. 6 | // Copyright © 2021 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | class SSCircleWaveSpin: SSSpinnerAnimationDelegate { 13 | 14 | /// setup spinner layer 15 | /// 16 | /// - Parameters: 17 | /// - layer: layer Parent layer (Button layer) 18 | /// - frame: frame of parant layer 19 | /// - color: color of spinner 20 | /// - spinnerSize: size of spinner 21 | var pulseLayers = [CAShapeLayer]() 22 | 23 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 24 | for _ in 0...3 { 25 | let pulseLayerPath = UIBezierPath(arcCenter: .zero, radius: CGFloat(spinnerSize ?? 0) , startAngle: CGFloat(0), endAngle: CGFloat(Double.pi * 2), clockwise: true) 26 | let pulseLayer = SpinnerLayers() 27 | pulseLayer.path = pulseLayerPath.cgPath 28 | pulseLayer.lineWidth = 1.0 29 | pulseLayer.fillColor = UIColor.clear.cgColor 30 | pulseLayer.lineCap = CAShapeLayerLineCap.round 31 | pulseLayer.position = CGPoint(x: CGFloat(spinnerSize ?? 0) , y: CGFloat(spinnerSize ?? 0)) 32 | layer.addSublayer(pulseLayer) 33 | pulseLayers.append(pulseLayer) 34 | } 35 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { 36 | self.animation(index: 0, color: color) 37 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { 38 | self.animation(index: 1, color: color) 39 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { 40 | self.animation(index: 2, color: color) 41 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.4) { 42 | self.animation(index: 3, color: color) 43 | } 44 | } 45 | } 46 | } 47 | } 48 | 49 | func animation(index: Int, color: UIColor) { 50 | pulseLayers[index].strokeColor = color.cgColor 51 | let animation = CABasicAnimation(keyPath: "transform.scale") 52 | animation.duration = 1.5 53 | animation.toValue = 0.9 54 | animation.fromValue = 0.0 55 | animation.timingFunction = CAMediaTimingFunction(name: .easeOut) 56 | animation.repeatCount = .infinity 57 | pulseLayers[index].add(animation, forKey: "scale") 58 | 59 | let opacityAnimation = CABasicAnimation(keyPath: #keyPath(CALayer.opacity)) 60 | opacityAnimation.duration = 2.0 61 | opacityAnimation.toValue = 0.0 62 | opacityAnimation.fromValue = 0.9 63 | opacityAnimation.timingFunction = CAMediaTimingFunction(name: .easeOut) 64 | opacityAnimation.repeatCount = .infinity 65 | pulseLayers[index].add(animation, forKey: "opacity") 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSErrorMark.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSErrorMark.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Ketan Chopda on 30/08/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Foundation 11 | /// 12 | class SSErrorMark: SSSpinnerAnimationDelegate { 13 | 14 | /// setup spinner layer 15 | /// 16 | /// - Parameters: 17 | /// - layer: layer Parent layer (Button layer) 18 | /// - frame: frame of parant layer 19 | /// - color: color of spinner 20 | /// - spinnerSize: size of spinner layer 21 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 22 | 23 | // add layer 24 | let errorMark = CheckMarkShape.errorMark.layerWith(frame: frame, color: color) 25 | layer.addSublayer(errorMark) 26 | 27 | // end status 28 | let strokeEnd: CGFloat = 10 29 | errorMark.strokeEnd = strokeEnd 30 | 31 | // animation 32 | let animation = CABasicAnimation(keyPath: "strokeEnd") 33 | animation.duration = 2.0 34 | animation.fromValue = 0.0 35 | animation.toValue = strokeEnd 36 | animation.isRemovedOnCompletion = true 37 | errorMark.add(animation, forKey: animation.keyPath) 38 | 39 | // shake animation 40 | let anim = CABasicAnimation(keyPath: "transform.rotation.z") 41 | anim.fromValue = (-Double.pi / 10) 42 | anim.toValue = (Double.pi / 10) 43 | anim.duration = 0.08 44 | anim.repeatCount = 4 45 | anim.autoreverses = true 46 | anim.isRemovedOnCompletion = true 47 | layer.add(anim, forKey: anim.keyPath) 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSFailMark.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSErrorMark.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 07/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | import UIKit 9 | import Foundation 10 | /// 11 | class SSFailMark: SSSpinnerAnimationDelegate { 12 | 13 | /// setup spinner layer 14 | /// 15 | /// - Parameters: 16 | /// - layer: layer Parent layer (Button layer) 17 | /// - frame: frame of parant layer 18 | /// - color: color of spinner 19 | /// - spinnerSize: size of spinner 20 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 21 | 22 | // add layer 23 | let failMark = CheckMarkShape.failMark.layerWith(frame: frame, color: color) 24 | layer.addSublayer(failMark) 25 | 26 | // end status 27 | let strokeEnd: CGFloat = 10 28 | failMark.strokeEnd = strokeEnd 29 | 30 | // animation 31 | let animation = CABasicAnimation(keyPath: "strokeEnd") 32 | animation.duration = 3.0 33 | animation.fromValue = 0.0 34 | animation.toValue = strokeEnd 35 | failMark.add(animation, forKey: nil) 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSLineSpinFadeLoader.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSLineSpinFadeLoader2.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 01/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /// 13 | class SSLineSpinFadeLoader: SSSpinnerAnimationDelegate { 14 | 15 | /// setup spinner layer 16 | /// 17 | /// - Parameters: 18 | /// - layer: layer Parent layer (Button layer) 19 | /// - frame: frame of parant layer 20 | /// - color: color of spinner 21 | /// - spinnerSize: size of spinner layer 22 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 23 | 24 | let defaultPadding: CGFloat = 4.0 25 | 26 | var sizeValue = max(min(frame.width, frame.height) - defaultPadding, 1.0) 27 | var center = CGPoint(x: (sizeValue / 2) + (defaultPadding / 2), y: (sizeValue/2) + (defaultPadding / 2)) 28 | if spinnerSize != nil && CGFloat(spinnerSize!) < sizeValue { 29 | sizeValue = max(CGFloat(spinnerSize!), 1.0) 30 | center = CGPoint(x: frame.height / 2, y: frame.height / 2) 31 | } 32 | let duration: CFTimeInterval = 1.2 33 | let beginTime = CACurrentMediaTime() 34 | let beginTimes: [CFTimeInterval] = [0.12, 0.24, 0.36, 0.48, 0.6, 0.72, 0.84, 0.96] 35 | let timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut) 36 | 37 | // Animation 38 | let animation = CAKeyframeAnimation(keyPath: "opacity") 39 | 40 | animation.keyTimes = [0, 0.5, 1] 41 | animation.timingFunctions = [timingFunction, timingFunction] 42 | animation.values = [1, 0.1, 1] 43 | animation.duration = duration 44 | animation.repeatCount = HUGE 45 | animation.isRemovedOnCompletion = false 46 | 47 | let lineSpacing: CGFloat = 2 48 | let lineSize = CGSize(width: max((sizeValue - 4 * lineSpacing) / 8, 1.0), height: max((sizeValue - 2 * lineSpacing) / 3, 1.0)) 49 | 50 | // Draw lines 51 | for i in 0 ..< 8 { 52 | let line = lineAt(angle: CGFloat(Double.pi / 4 * Double(i)), 53 | size: lineSize, 54 | origin: center, 55 | containerSize: CGSize(width: sizeValue, height: sizeValue), 56 | color: color) 57 | 58 | 59 | animation.beginTime = beginTime + beginTimes[i] 60 | line.add(animation, forKey: "animation") 61 | layer.addSublayer(line) 62 | } 63 | 64 | 65 | } 66 | 67 | func lineAt(angle: CGFloat, size: CGSize, origin: CGPoint, containerSize: CGSize, color: UIColor) -> CALayer { 68 | let radius = (containerSize.width / 2 - max(size.width, size.height) / 2) - 2 69 | let lineContainerSize = CGSize(width: max(size.width, size.height), height: max(size.width, size.height)) 70 | let lineContainer = SpinnerLayers() 71 | let lineContainerFrame = CGRect( 72 | x: origin.x + radius * (cos(angle) - 0.5), 73 | y: origin.y + radius * (sin(angle) - 0.5), 74 | width: lineContainerSize.width, 75 | height: lineContainerSize.height) 76 | let line = SpinnerShape.line.layerWith(size: size, color: color) 77 | let lineFrame = CGRect( 78 | x: (lineContainerSize.width - size.width) / 2, 79 | y: (lineContainerSize.height - size.height) / 2, 80 | width: size.width, 81 | height: size.height) 82 | 83 | lineContainer.frame = lineContainerFrame 84 | line.frame = lineFrame 85 | lineContainer.addSublayer(line) 86 | lineContainer.sublayerTransform = CATransform3DMakeRotation(CGFloat(Double.pi / 2) + angle, 0, 0, 1) 87 | 88 | return lineContainer 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSPacman.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSPacman.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Pranay Patel on 16/02/22. 6 | // Copyright © 2022 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | class SSPacman: SSSpinnerAnimationDelegate { 13 | 14 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 15 | pacmanInLayer(layer, frame: frame, color: color) 16 | circleInLayer(layer, frame: frame, color: color) 17 | } 18 | 19 | func pacmanInLayer(_ layer: CALayer, frame: CGRect, color: UIColor) { 20 | let pacmanSize = frame.size.height / 3 21 | let pacmanDuration: CFTimeInterval = 1 22 | let timingFunction = CAMediaTimingFunction(name: .default) 23 | 24 | // Stroke start animation 25 | let strokeStartAnimation = CAKeyframeAnimation(keyPath: "strokeStart") 26 | 27 | strokeStartAnimation.keyTimes = [0, 0.5, 1] 28 | strokeStartAnimation.timingFunctions = [timingFunction, timingFunction] 29 | strokeStartAnimation.values = [0.125, 0, 0.125] 30 | strokeStartAnimation.duration = pacmanDuration 31 | 32 | // Stroke end animation 33 | let strokeEndAnimation = CAKeyframeAnimation(keyPath: "strokeEnd") 34 | 35 | strokeEndAnimation.keyTimes = [0, 0.5, 1] 36 | strokeEndAnimation.timingFunctions = [timingFunction, timingFunction] 37 | strokeEndAnimation.values = [0.875, 1, 0.875] 38 | strokeEndAnimation.duration = pacmanDuration 39 | 40 | // Animation 41 | let animation = CAAnimationGroup() 42 | 43 | animation.animations = [strokeStartAnimation, strokeEndAnimation] 44 | animation.duration = pacmanDuration 45 | animation.repeatCount = HUGE 46 | animation.isRemovedOnCompletion = false 47 | 48 | let pacman = SpinnerShape.pacman.layerWith(size: CGSize(width: pacmanSize, height: pacmanSize), color: color) 49 | let frame = CGRect( 50 | x: ((layer.bounds.size.height / 2) - (layer.bounds.size.height / 4)), 51 | y: (layer.bounds.size.height - pacmanSize) / 2, 52 | width: pacmanSize, 53 | height: pacmanSize 54 | ) 55 | pacman.frame = frame 56 | pacman.add(animation, forKey: "animation") 57 | layer.addSublayer(pacman) 58 | 59 | 60 | } 61 | 62 | func circleInLayer(_ layer: CALayer, frame: CGRect, color: UIColor) { 63 | let circleSize = frame.size.height / 8 64 | let circleDuration: CFTimeInterval = 0.9 65 | 66 | // Translate animation 67 | let translateAnimation = CABasicAnimation(keyPath: "transform.translation.x") 68 | 69 | translateAnimation.fromValue = 0 70 | translateAnimation.toValue = -frame.size.height / 2 71 | translateAnimation.duration = circleDuration 72 | 73 | // Opacity animation 74 | let opacityAnimation = CABasicAnimation(keyPath: "opacity") 75 | 76 | opacityAnimation.fromValue = 1 77 | opacityAnimation.toValue = 0.7 78 | opacityAnimation.duration = circleDuration 79 | 80 | // Animation 81 | let animation = CAAnimationGroup() 82 | 83 | animation.animations = [translateAnimation, opacityAnimation] 84 | animation.timingFunction = CAMediaTimingFunction(name: .linear) 85 | animation.duration = circleDuration 86 | animation.repeatCount = HUGE 87 | animation.isRemovedOnCompletion = false 88 | 89 | let animatableLayer = SpinnerShape.circle.layerWith(size: CGSize(width: circleSize, height: circleSize), color: color) 90 | animatableLayer.frame = CGRect(x: ((layer.bounds.size.height / 2) + (layer.bounds.size.height / 4)), y: (layer.bounds.size.height - circleSize) / 2, width: circleSize, height: circleSize) 91 | animatableLayer.frame.size.height = circleSize 92 | animatableLayer.frame.size.width = circleSize 93 | animatableLayer.add(animation, forKey: "animation") 94 | layer.addSublayer(animatableLayer) 95 | } 96 | } 97 | 98 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSSpinnerBallClipRotate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SsspinerBallClipRotate2.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 01/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /// 13 | class SSSpinnerBallClipRotate: SSSpinnerAnimationDelegate { 14 | 15 | /// setup spinner layer 16 | /// 17 | /// - Parameters: 18 | /// - layer: layer Parent layer (Button layer) 19 | /// - frame: frame of parant layer 20 | /// - color: color of spinner 21 | /// - spinnerSize: size of spinner layer 22 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 23 | 24 | var sizeValue = min(frame.width, frame.height) 25 | var center = CGPoint(x: 0, y: 0) 26 | if spinnerSize != nil && CGFloat(spinnerSize!) < sizeValue { 27 | sizeValue = max(CGFloat(spinnerSize!), 1.0) 28 | center = CGPoint(x: frame.height / 2 - sizeValue / 2, y: frame.height / 2 - sizeValue / 2) 29 | } 30 | let ballClip = SpinnerShape.ring.layerWith(size: CGSize(width: sizeValue, height: sizeValue), color: color) 31 | ballClip.frame = CGRect(x: center.x, y: center.x, width: sizeValue, height: sizeValue) 32 | ballClip.frame.size.height = sizeValue 33 | ballClip.frame.size.width = sizeValue 34 | layer.addSublayer(ballClip) 35 | 36 | let scaleAnimation = CAKeyframeAnimation(keyPath: "transform.scale") 37 | scaleAnimation.keyTimes = [0, 0.5, 1].map { NSNumber(value: $0) } 38 | scaleAnimation.values = [0.8, 0.4, 0.8].map { NSNumber(value: $0) } 39 | 40 | // Rotate animation 41 | let rotateAnimation = CAKeyframeAnimation(keyPath: "transform.rotation.z") 42 | 43 | rotateAnimation.keyTimes = scaleAnimation.keyTimes 44 | rotateAnimation.values = [0, Double.pi, 2 * Double.pi].map { NSNumber(value: $0) } 45 | let animationGroup = CAAnimationGroup() 46 | animationGroup.duration = 1 47 | animationGroup.repeatCount = HUGE 48 | animationGroup.isRemovedOnCompletion = false 49 | animationGroup.animations = [scaleAnimation, rotateAnimation] 50 | ballClip.add(animationGroup, forKey: "animation") 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerShapeWithAnimation/SSSuccessMark.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SSCheckMark.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Ketan Chopda on 29/08/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | /// 11 | class SSSuccessMark: SSSpinnerAnimationDelegate { 12 | 13 | /// setup spinner layer 14 | /// 15 | /// - Parameters: 16 | /// - layer: layer Parent layer (Button layer) 17 | /// - frame: frame of parant layer 18 | /// - color: color of spinner 19 | /// - spinnerSize: size of spinner 20 | func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor, spinnerSize: UInt?) { 21 | 22 | // add layer 23 | let successMark = CheckMarkShape.successMark.layerWith(frame: frame, color: color) 24 | layer.addSublayer(successMark) 25 | 26 | // end status 27 | let strokeEnd: CGFloat = 10 28 | successMark.strokeEnd = strokeEnd 29 | 30 | // animation 31 | let animation = CABasicAnimation(keyPath: "strokeEnd") 32 | animation.duration = 1.0 33 | animation.fromValue = 0.0 34 | animation.toValue = strokeEnd 35 | successMark.add(animation, forKey: nil) 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/SpinnerTypes.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SpinnerTypes.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 01/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /// Spinner Types 13 | /// 14 | /// - ballClipRotate: 15 | /// - ballSpinFade: 16 | /// - lineSpinFade: 17 | /// - ballRotateChase: 18 | /// - circleStrokeSpin: 19 | /// - checkMark: 20 | /// - failMark: 21 | /// - errorMark: 22 | public enum SpinnerType: Int { 23 | /** 24 | BallClipRotate. 25 | 26 | - returns: Instance of SSSpinnerBallClipRotate. 27 | */ 28 | case ballClipRotate 29 | /** 30 | BallSpinFade. 31 | 32 | - returns: Instance of SSBallSpinFadeLoader. 33 | */ 34 | case ballSpinFade 35 | /** 36 | LineSpinFade. 37 | 38 | - returns: Instance of SSLineSpinFadeLoader. 39 | */ 40 | case lineSpinFade 41 | /** 42 | BallRotateChase. 43 | 44 | - returns: Instance of SSBallRotateChase. 45 | */ 46 | case ballRotateChase 47 | /** 48 | CircleStrokeSpin. 49 | 50 | - returns: Instance of SSCircleStrokeSpin. 51 | */ 52 | case circleStrokeSpin 53 | 54 | /** 55 | CirclePulseSpin. 56 | 57 | - returns: Instance of SSCircleStrokeSpin. 58 | */ 59 | case circleScaleMultiple 60 | 61 | /** 62 | CirclePulseSpin. 63 | 64 | - returns: Instance of SSCircleStrokeSpin. 65 | */ 66 | case circleWaveSpin 67 | case pacman 68 | 69 | /// Animation of spinner 70 | /// 71 | /// - Returns: 72 | func animation() -> SSSpinnerAnimationDelegate { 73 | switch self { 74 | case .ballClipRotate: 75 | return SSSpinnerBallClipRotate() 76 | case .ballSpinFade: 77 | return SSBallSpinFadeLoader() 78 | case .lineSpinFade: 79 | return SSLineSpinFadeLoader() 80 | case .ballRotateChase: 81 | return SSBallRotateChase() 82 | case .circleStrokeSpin: 83 | return SSCircleStrokeSpin() 84 | case .circleScaleMultiple: 85 | return SSCircleScaleMultiple() 86 | case .circleWaveSpin: 87 | return SSCircleWaveSpin() 88 | case .pacman: 89 | return SSPacman() 90 | } 91 | } 92 | 93 | } 94 | 95 | public enum SpinnerCompletionType: Int { 96 | /** 97 | CheckMark. 98 | 99 | - returns: Instance of SSCheckMark. 100 | */ 101 | case checkMark 102 | /** 103 | FailMark. 104 | 105 | - returns: Instance of SSFailMark. 106 | */ 107 | case failMark 108 | /** 109 | ErrorMark. 110 | 111 | - returns: Instance of SSErrorMark. 112 | */ 113 | case errorMark 114 | 115 | func animation() -> SSSpinnerAnimationDelegate { 116 | switch self { 117 | case .checkMark: 118 | return SSSuccessMark() 119 | case .failMark: 120 | return SSFailMark() 121 | case .errorMark: 122 | return SSErrorMark() 123 | } 124 | } 125 | 126 | } 127 | -------------------------------------------------------------------------------- /SSSpinnerButton/SpinerShapes/spinnerLayers.swift: -------------------------------------------------------------------------------- 1 | // 2 | // spinnerLayers.swift 3 | // SSSpinnerButton 4 | // 5 | // Created by Bhargav Bajani on 01/06/18. 6 | // Copyright © 2018 Simform Solutions. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// 12 | class SpinnerLayers: CAShapeLayer { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /SpinnerButtonRippleEffect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/SpinnerButtonRippleEffect.png -------------------------------------------------------------------------------- /SpinnerButtonStoryBoard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/SpinnerButtonStoryBoard.png -------------------------------------------------------------------------------- /docs/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

SSSpinnerButton Docs (64% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 103 |
104 |
105 |
106 |

Protocols

107 |

The following protocols are available globally.

108 | 109 |
110 |
111 |
112 |
    113 |
  • 114 |
    115 | 116 | 117 | 118 | SSSpinnerAnimationDelegate 119 | 120 |
    121 |
    122 |
    123 |
    124 |
    125 |
    126 | 127 | See more 128 |
    129 |
    130 |

    Declaration

    131 |
    132 |

    Swift

    133 |
    protocol SSSpinnerAnimationDelegate
    134 | 135 |
    136 |
    137 |
    138 |
    139 |
  • 140 |
141 |
142 |
143 |
144 | 148 |
149 |
150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 64% 23 | 24 | 25 | 64% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy. 7 | CFBundleName 8 | 9 | DocSetPlatformFamily 10 | 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Classes Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (76% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 48 |
49 |
50 |
51 |

Classes

52 |

The following classes are available globally.

53 | 54 |
55 |
56 |
57 |
    58 |
  • 59 |
    60 | 61 | 62 | 63 | SSSpinnerButton 64 | 65 |
    66 |
    67 |
    68 |
    69 |
    70 |
    71 |

    Undocumented

    72 | 73 | See more 74 |
    75 |
    76 |

    Declaration

    77 |
    78 |

    Swift

    79 |
    open class SSSpinnerButton : UIButton
    80 | 81 |
    82 |
    83 |
    84 |
    85 |
  • 86 |
87 |
88 |
89 |
90 | 94 |
95 |
96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Enums.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Enumerations Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (76% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 48 |
49 |
50 |
51 |

Enumerations

52 |

The following enumerations are available globally.

53 | 54 |
55 |
56 |
57 |
    58 |
  • 59 |
    60 | 61 | 62 | 63 | SpinnerType 64 | 65 |
    66 |
    67 |
    68 |
    69 |
    70 |
    71 |

    Spinner Types

    72 | 73 |
      74 |
    • ballClipRotate:
    • 75 |
    • ballSpinFade:
    • 76 |
    • lineSpinFade:
    • 77 |
    • ballRotateChase:
    • 78 |
    • circleStrokeSpin:
    • 79 |
    80 | 81 | See more 82 |
    83 |
    84 |

    Declaration

    85 |
    86 |

    Swift

    87 |
    public enum SpinnerType : Int
    88 | 89 |
    90 |
    91 |
    92 |
    93 |
  • 94 |
95 |
96 |
97 |
98 | 102 |
103 |
104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Extensions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Extensions Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (27% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 91 |
92 |
93 |
94 |

Extensions

95 |

The following extensions are available globally.

96 | 97 |
98 |
99 |
100 |
    101 |
  • 102 |
    103 | 104 | 105 | 106 | CAGradientLayer 107 | 108 |
    109 |
    110 |
    111 |
    112 |
    113 |
    114 | 115 | See more 116 |
    117 |
    118 |

    Declaration

    119 |
    120 |

    Swift

    121 |
    class CAGradientLayer : CALayer
    122 | 123 |
    124 |
    125 |
    126 |
    127 |
  • 128 |
129 |
130 |
131 |
132 | 136 |
137 |
138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Extensions/CAGradientLayer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CAGradientLayer Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (27% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 91 |
92 |
93 |
94 |

CAGradientLayer

95 |
96 |
97 |
class CAGradientLayer : CALayer
98 | 99 |
100 |
101 | 102 |
103 |
104 |
105 |
    106 |
  • 107 |
    108 | 109 | 110 | 111 | init(frame:) 112 | 113 |
    114 |
    115 |
    116 |
    117 |
    118 |
    119 |

    Undocumented

    120 | 121 |
    122 |
    123 |

    Declaration

    124 |
    125 |

    Swift

    126 |
    convenience init(frame: CGRect)
    127 | 128 |
    129 |
    130 |
    131 |
    132 |
  • 133 |
134 |
135 |
136 |
137 | 141 |
142 |
143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (27% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 91 |
92 |
93 |
94 |

Protocols

95 |

The following protocols are available globally.

96 | 97 |
98 |
99 |
100 |
    101 |
  • 102 |
    103 | 104 | 105 | 106 | SSSpinnerAnimationDelegate 107 | 108 |
    109 |
    110 |
    111 |
    112 |
    113 |
    114 |

    Undocumented

    115 | 116 | See more 117 |
    118 |
    119 |

    Declaration

    120 |
    121 |

    Swift

    122 |
    protocol SSSpinnerAnimationDelegate
    123 | 124 |
    125 |
    126 |
    127 |
    128 |
  • 129 |
130 |
131 |
132 |
133 | 137 |
138 |
139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 76% 23 | 24 | 25 | 76% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Docs (76% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 47 |
48 |
49 |
50 | 51 |

Authors

52 | 53 |

help

54 | 55 |
56 |
57 | 61 |
62 |
63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/search.json: -------------------------------------------------------------------------------- 1 | {"Enums/SpinnerType.html#/s:16SSSpinnerButtons11SpinnerTypeO14ballClipRotateA2CmF":{"name":"ballClipRotate","abstract":"

BallClipRotate.

","parent_name":"SpinnerType"},"Enums/SpinnerType.html#/s:16SSSpinnerButtons11SpinnerTypeO12ballSpinFadeA2CmF":{"name":"ballSpinFade","abstract":"

BallSpinFade.

","parent_name":"SpinnerType"},"Enums/SpinnerType.html#/s:16SSSpinnerButtons11SpinnerTypeO12lineSpinFadeA2CmF":{"name":"lineSpinFade","abstract":"

LineSpinFade.

","parent_name":"SpinnerType"},"Enums/SpinnerType.html#/s:16SSSpinnerButtons11SpinnerTypeO15ballRotateChaseA2CmF":{"name":"ballRotateChase","abstract":"

BallRotateChase.

","parent_name":"SpinnerType"},"Enums/SpinnerType.html#/s:16SSSpinnerButtons11SpinnerTypeO16circleStrokeSpinA2CmF":{"name":"circleStrokeSpin","abstract":"

CircleStrokeSpin.

","parent_name":"SpinnerType"},"Enums/SpinnerType.html":{"name":"SpinnerType","abstract":"

Spinner Types

"},"Classes/SSSpinnerButton.html#/s:16SSSpinnerButtons0A6ButtonC12spinnerColorSo7UIColorCv":{"name":"spinnerColor","abstract":"

Sets the spinner color

","parent_name":"SSSpinnerButton"},"Classes/SSSpinnerButton.html#/s:16SSSpinnerButtons0A6ButtonC5titleSSSgv":{"name":"title","abstract":"

Sets the button title for its normal state

","parent_name":"SSSpinnerButton"},"Classes/SSSpinnerButton.html#/s:16SSSpinnerButtons0A6ButtonC10titleColorSo7UIColorCSgv":{"name":"titleColor","abstract":"

Sets the button title color.

","parent_name":"SSSpinnerButton"},"Classes/SSSpinnerButton.html#/c:@M@SSSpinnerButtons@objc(cs)SSSpinnerButton(im)initWithCoder:":{"name":"init(coder:)","abstract":"

Undocumented

","parent_name":"SSSpinnerButton"},"Classes/SSSpinnerButton.html#/s:16SSSpinnerButtons0A6ButtonCACSS5title_tcfc":{"name":"init(title:)","abstract":"

init method

","parent_name":"SSSpinnerButton"},"Classes/SSSpinnerButton.html#/c:@M@SSSpinnerButtons@objc(cs)SSSpinnerButton(im)layoutSubviews":{"name":"layoutSubviews()","abstract":"

Undocumented

","parent_name":"SSSpinnerButton"},"Classes/SSSpinnerButton.html#/s:16SSSpinnerButtons0A6ButtonC14gradientColorsSaySo7CGColorCGSgv":{"name":"gradientColors","abstract":"

Sets the colors for the gradient background

","parent_name":"SSSpinnerButton"},"Classes/SSSpinnerButton.html#/s:16SSSpinnerButtons0A6ButtonC12startAnimateyAA11SpinnerTypeO07spinnerG0_So7UIColorC12spinnercoloryycSg8complatetF":{"name":"startAnimate(spinnerType:spinnercolor:complate:)","abstract":"

Start Animation

","parent_name":"SSSpinnerButton"},"Classes/SSSpinnerButton.html#/s:16SSSpinnerButtons0A6ButtonC11stopAnimateyyycSg8complate_tF":{"name":"stopAnimate(complate:)","abstract":"

stop Animation and set button in actual state

","parent_name":"SSSpinnerButton"},"Classes/SSSpinnerButton.html":{"name":"SSSpinnerButton","abstract":"

Undocumented

"},"Classes.html":{"name":"Classes","abstract":"

The following classes are available globally.

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"}} -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/undocumented.json: -------------------------------------------------------------------------------- 1 | { 2 | "warnings": [ 3 | { 4 | "file": "/Users/bhargav.bajani/Documents/Data/Demo/SpinnerButtonPod/SSSpinnerButtons/SSSpinnerButtons/SSSpinnerButton/SpinnerButton/SSSpinnerButton.swift", 5 | "line": null, 6 | "symbol": "SSSpinnerButton", 7 | "symbol_kind": "source.lang.swift.decl.extension", 8 | "warning": "undocumented" 9 | }, 10 | { 11 | "file": "/Users/bhargav.bajani/Documents/Data/Demo/SpinnerButtonPod/SSSpinnerButtons/SSSpinnerButtons/SSSpinnerButton/SpinnerButton/SSSpinnerButton.swift", 12 | "line": 19, 13 | "symbol": "SSSpinnerButton", 14 | "symbol_kind": "source.lang.swift.decl.class", 15 | "warning": "undocumented" 16 | }, 17 | { 18 | "file": "/Users/bhargav.bajani/Documents/Data/Demo/SpinnerButtonPod/SSSpinnerButtons/SSSpinnerButtons/SSSpinnerButton/SpinnerButton/SSSpinnerButton.swift", 19 | "line": 68, 20 | "symbol": "SSSpinnerButton.init(coder:)", 21 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 22 | "warning": "undocumented" 23 | }, 24 | { 25 | "file": "/Users/bhargav.bajani/Documents/Data/Demo/SpinnerButtonPod/SSSpinnerButtons/SSSpinnerButtons/SSSpinnerButton/SpinnerButton/SSSpinnerButton.swift", 26 | "line": 82, 27 | "symbol": "SSSpinnerButton.layoutSubviews()", 28 | "symbol_kind": "source.lang.swift.decl.function.method.instance", 29 | "warning": "undocumented" 30 | } 31 | ], 32 | "source_directory": "/Users/bhargav.bajani/Documents/Data/Demo/SpinnerButtonPod/SSSpinnerButtons" 33 | } -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/.tgz -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton 2.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.ssspinnerbutton 7 | CFBundleName 8 | SSSpinnerButton 9 | DocSetPlatformFamily 10 | ssspinnerbutton 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

SSSpinnerButton Docs (64% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 103 |
104 |
105 |
106 |

Protocols

107 |

The following protocols are available globally.

108 | 109 |
110 |
111 |
112 |
    113 |
  • 114 |
    115 | 116 | 117 | 118 | SSSpinnerAnimationDelegate 119 | 120 |
    121 |
    122 |
    123 |
    124 |
    125 |
    126 | 127 | See more 128 |
    129 |
    130 |

    Declaration

    131 |
    132 |

    Swift

    133 |
    protocol SSSpinnerAnimationDelegate
    134 | 135 |
    136 |
    137 |
    138 |
    139 |
  • 140 |
141 |
142 |
143 |
144 | 148 |
149 |
150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 64% 23 | 24 | 25 | 64% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButton 2.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.ssspinnerbutton 7 | CFBundleName 8 | SSSpinnerButton 9 | DocSetPlatformFamily 10 | ssspinnerbutton 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

SSSpinnerButton Docs (64% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 103 |
104 |
105 |
106 |

Protocols

107 |

The following protocols are available globally.

108 | 109 |
110 |
111 |
112 |
    113 |
  • 114 |
    115 | 116 | 117 | 118 | SSSpinnerAnimationDelegate 119 | 120 |
    121 |
    122 |
    123 |
    124 |
    125 |
    126 | 127 | See more 128 |
    129 |
    130 |

    Declaration

    131 |
    132 |

    Swift

    133 |
    protocol SSSpinnerAnimationDelegate
    134 | 135 |
    136 |
    137 |
    138 |
    139 |
  • 140 |
141 |
142 |
143 |
144 | 148 |
149 |
150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 64% 23 | 24 | 25 | 64% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButton.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButton.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButton.tgz -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy.ssspinnerbuttons 7 | CFBundleName 8 | SSSpinnerButtons 9 | DocSetPlatformFamily 10 | ssspinnerbuttons 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/Classes/SSCircleStrokeSpin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SSCircleStrokeSpin Class Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

SSSpinnerButtons Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 85 |
86 |
87 |
88 |

SSCircleStrokeSpin

89 |
90 |
91 |
class SSCircleStrokeSpin : SSSpinnerAnimationDelegate
92 | 93 |
94 |
95 | 96 |
97 |
98 |
99 |
    100 |
  • 101 |
    102 | 103 | 104 | 105 | setupSpinnerAnimation(layer:frame:color:) 106 | 107 |
    108 |
    109 |
    110 |
    111 |
    112 |
    113 |

    setup spinner layer

    114 | 115 |
    116 |
    117 |

    Declaration

    118 |
    119 |

    Swift

    120 |
    func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor)
    121 | 122 |
    123 |
    124 |
    125 |
    126 |
  • 127 |
128 |
129 |
130 |
131 | 135 |
136 |
137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/Classes/SSSpinnerBallClipRotate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SSSpinnerBallClipRotate Class Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

SSSpinnerButtons Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 85 |
86 |
87 |
88 |

SSSpinnerBallClipRotate

89 |
90 |
91 |
class SSSpinnerBallClipRotate : SSSpinnerAnimationDelegate
92 | 93 |
94 |
95 | 96 |
97 |
98 |
99 |
    100 |
  • 101 |
    102 | 103 | 104 | 105 | setupSpinnerAnimation(layer:frame:color:) 106 | 107 |
    108 |
    109 |
    110 |
    111 |
    112 |
    113 |

    setup spinner layer

    114 | 115 |
    116 |
    117 |

    Declaration

    118 |
    119 |

    Swift

    120 |
    func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor)
    121 | 122 |
    123 |
    124 |
    125 |
    126 |
  • 127 |
128 |
129 |
130 |
131 | 135 |
136 |
137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/Extensions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Extensions Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

SSSpinnerButtons Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 85 |
86 |
87 |
88 |

Extensions

89 |

The following extensions are available globally.

90 | 91 |
92 |
93 |
94 |
95 | 96 | 97 | 98 |

99 |
100 |
101 |
    102 |
  • 103 |
    104 | 105 | 106 | 107 | CAGradientLayer 108 | 109 |
    110 |
    111 |
    112 |
    113 |
    114 |
    115 | 116 | See more 117 |
    118 |
    119 |

    Declaration

    120 |
    121 |

    Swift

    122 |
    class CAGradientLayer : CALayer
    123 | 124 |
    125 |
    126 |
    127 |
    128 |
  • 129 |
130 |
131 |
132 |
133 | 137 |
138 |
139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/Extensions/CAGradientLayer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CAGradientLayer Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

SSSpinnerButtons Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 85 |
86 |
87 |
88 |

CAGradientLayer

89 |
90 |
91 |
class CAGradientLayer : CALayer
92 | 93 |
94 |
95 | 96 |
97 |
98 |
99 |
    100 |
  • 101 |
    102 | 103 | 104 | 105 | init(frame:) 106 | 107 |
    108 |
    109 |
    110 |
    111 |
    112 |
    113 | 114 |
    115 |
    116 |

    Declaration

    117 |
    118 |

    Swift

    119 |
    convenience init(frame: CGRect)
    120 | 121 |
    122 |
    123 |
    124 |
    125 |
  • 126 |
127 |
128 |
129 |
130 | 134 |
135 |
136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

SSSpinnerButtons Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 85 |
86 |
87 |
88 |

Protocols

89 |

The following protocols are available globally.

90 | 91 |
92 |
93 |
94 |
    95 |
  • 96 |
    97 | 98 | 99 | 100 | SSSpinnerAnimationDelegate 101 | 102 |
    103 |
    104 |
    105 |
    106 |
    107 |
    108 | 109 | See more 110 |
    111 |
    112 |

    Declaration

    113 |
    114 |

    Swift

    115 |
    protocol SSSpinnerAnimationDelegate
    116 | 117 |
    118 |
    119 |
    120 |
    121 |
  • 122 |
123 |
124 |
125 |
126 | 130 |
131 |
132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/Protocols/SSSpinnerAnimationDelegate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SSSpinnerAnimationDelegate Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

SSSpinnerButtons Docs (100% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 85 |
86 |
87 |
88 |

SSSpinnerAnimationDelegate

89 |
90 |
91 |
protocol SSSpinnerAnimationDelegate
92 | 93 |
94 |
95 | 96 |
97 |
98 |
99 |
    100 |
  • 101 |
    102 | 103 | 104 | 105 | setupSpinnerAnimation(layer:frame:color:) 106 | 107 |
    108 |
    109 |
    110 |
    111 |
    112 |
    113 | 114 |
    115 |
    116 |

    Declaration

    117 |
    118 |

    Swift

    119 |
    func setupSpinnerAnimation(layer: CALayer, frame: CGRect, color: UIColor)
    120 | 121 |
    122 |
    123 |
    124 |
    125 |
  • 126 |
127 |
128 |
129 |
130 | 134 |
135 |
136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 65% 23 | 24 | 25 | 65% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SSSpinnerButtons Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

SSSpinnerButtons Docs (100% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 84 |
85 |
86 |
87 | 88 |

SSspinnerButton

89 | 90 |

SSSpinnerButton is an elegant button with a different spinner animations. 91 | Swift Version 92 | Build Status 93 | License 94 | Platform 95 | PRs Welcome

96 | 97 |

Alt text

98 |

Features!

99 | 100 |
    101 |
  • Rounded button when spinner active
  • 102 |
  • Various spinner animations
  • 103 |
  • CocoaPods
  • 104 |
105 |

Requirements

106 | 107 |
    108 |
  • iOS 10.0+
  • 109 |
  • Xcode 9+
  • 110 |
111 |

Installation

112 | 113 |

CocoaPods

114 | 115 |
    116 |
  • You can use CocoaPods to install SSSpinnerButton by adding it to your Podfile:

    117 |
    use_frameworks!
    118 | pod 'SSSpinnerButton', :git => 'https://github.com/simformsolutions/SSSpinnerButton'
    119 | 
  • 120 |
  •   import UIKit
    121 |   import SSSpinnerButton
    122 | 
  • 123 |
124 | 125 |

Manually

126 | 127 |
    128 |
  • Download and drop SSSpinnerButton in your project.
  • 129 |
  • Congratulations!
  • 130 |
131 |

Usage example

132 | 133 |
    134 |
  • In the storyboard add a UIButton and change its class to SSSpinnerButton 135 | ### StartAnimation 136 | button.startAnimate(spinnerType: SpinnerType.ballClipRotate, spinnercolor: UIColor.red, complate: nil) 137 | ### StopAnimation 138 | button.stopAnimate(complate: { 139 | }) 140 | # Documents
  • 141 |
142 |

Contribute

143 | 144 |
    145 |
  • We would love you for the contribution to SSspinnerButton, check the LICENSE file for more info. 146 | # Meta
  • 147 |
  • Distributed under the MIT license. See LICENSE for more information.
  • 148 |
149 | 150 |
151 |
152 | 156 |
157 |
158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButtons.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/SSSpinnerButtons.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/docsets/SSSpinnerButtons.tgz -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/img/dash.png -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSSpinnerButton/bf7b995c50c194e6b8ea083f26a558f08dc4f093/docs/img/gh.png -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | --------------------------------------------------------------------------------