├── XProgressRing ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── XProgressRing.swift │ └── KDCircularProgress.swift ├── _Pods.xcodeproj ├── docs └── screenShots │ ├── s1.png │ ├── s2.png │ ├── demo1.gif │ ├── demo2.gif │ ├── demo3.gif │ └── demo4.gif ├── Example ├── Pods │ ├── Target Support Files │ │ ├── XProgressRing │ │ │ ├── XProgressRing-prefix.pch │ │ │ ├── XProgressRing.modulemap │ │ │ ├── XProgressRing-dummy.m │ │ │ ├── XProgressRing-umbrella.h │ │ │ ├── XProgressRing.xcconfig │ │ │ └── Info.plist │ │ ├── Pods-XProgressRing_Tests │ │ │ ├── Pods-XProgressRing_Tests-acknowledgements.markdown │ │ │ ├── Pods-XProgressRing_Tests.modulemap │ │ │ ├── Pods-XProgressRing_Tests-dummy.m │ │ │ ├── Pods-XProgressRing_Tests-umbrella.h │ │ │ ├── Pods-XProgressRing_Tests.debug.xcconfig │ │ │ ├── Pods-XProgressRing_Tests.release.xcconfig │ │ │ ├── Info.plist │ │ │ ├── Pods-XProgressRing_Tests-acknowledgements.plist │ │ │ ├── Pods-XProgressRing_Tests-frameworks.sh │ │ │ └── Pods-XProgressRing_Tests-resources.sh │ │ └── Pods-XProgressRing_Example │ │ │ ├── Pods-XProgressRing_Example.modulemap │ │ │ ├── Pods-XProgressRing_Example-dummy.m │ │ │ ├── Pods-XProgressRing_Example-umbrella.h │ │ │ ├── Pods-XProgressRing_Example.debug.xcconfig │ │ │ ├── Pods-XProgressRing_Example.release.xcconfig │ │ │ ├── Info.plist │ │ │ ├── Pods-XProgressRing_Example-acknowledgements.markdown │ │ │ ├── Pods-XProgressRing_Example-acknowledgements.plist │ │ │ ├── Pods-XProgressRing_Example-frameworks.sh │ │ │ └── Pods-XProgressRing_Example-resources.sh │ ├── Manifest.lock │ ├── Local Podspecs │ │ └── XProgressRing.podspec.json │ └── Pods.xcodeproj │ │ └── project.pbxproj ├── XProgressRing.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── XProgressRing-Example.xcscheme │ └── project.pbxproj ├── XProgressRing.xcworkspace │ └── contents.xcworkspacedata ├── Podfile.lock ├── Podfile ├── XProgressRing │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ViewController.swift │ ├── Info.plist │ ├── AppDelegate.swift │ └── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard └── Tests │ ├── Info.plist │ └── Tests.swift ├── .travis.yml ├── .gitignore ├── LICENSE ├── XProgressRing.podspec └── README.md /XProgressRing/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /XProgressRing/Classes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /docs/screenShots/s1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubhiH/XprogressRing/HEAD/docs/screenShots/s1.png -------------------------------------------------------------------------------- /docs/screenShots/s2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubhiH/XprogressRing/HEAD/docs/screenShots/s2.png -------------------------------------------------------------------------------- /docs/screenShots/demo1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubhiH/XprogressRing/HEAD/docs/screenShots/demo1.gif -------------------------------------------------------------------------------- /docs/screenShots/demo2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubhiH/XprogressRing/HEAD/docs/screenShots/demo2.gif -------------------------------------------------------------------------------- /docs/screenShots/demo3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubhiH/XprogressRing/HEAD/docs/screenShots/demo3.gif -------------------------------------------------------------------------------- /docs/screenShots/demo4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SubhiH/XprogressRing/HEAD/docs/screenShots/demo4.gif -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XProgressRing/XProgressRing-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XProgressRing/XProgressRing.modulemap: -------------------------------------------------------------------------------- 1 | framework module XProgressRing { 2 | umbrella header "XProgressRing-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XProgressRing/XProgressRing-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_XProgressRing : NSObject 3 | @end 4 | @implementation PodsDummy_XProgressRing 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XProgressRing/XProgressRing-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double XProgressRingVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char XProgressRingVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_XProgressRing_Tests { 2 | umbrella header "Pods-XProgressRing_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_XProgressRing_Example { 2 | umbrella header "Pods-XProgressRing_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XProgressRing_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XProgressRing_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/XProgressRing.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_XProgressRing_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_XProgressRing_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_XProgressRing_TestsVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_XProgressRing_TestsVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_XProgressRing_ExampleVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_XProgressRing_ExampleVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/XProgressRing.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - XProgressRing (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - XProgressRing (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | XProgressRing: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | XProgressRing: 3d28e1158a98839e041d6e1cbee480903134e9a8 13 | 14 | PODFILE CHECKSUM: 09bb5e6c441d8eb878672f3f4f6f00c891086923 15 | 16 | COCOAPODS: 1.0.1 17 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - XProgressRing (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - XProgressRing (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | XProgressRing: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | XProgressRing: 3d28e1158a98839e041d6e1cbee480903134e9a8 13 | 14 | PODFILE CHECKSUM: 09bb5e6c441d8eb878672f3f4f6f00c891086923 15 | 16 | COCOAPODS: 1.0.1 17 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'XProgressRing_Example' do 4 | pod 'XProgressRing', :path => '../' 5 | 6 | target 'XProgressRing_Tests' do 7 | inherit! :search_paths 8 | 9 | post_install do |installer| 10 | installer.pods_project.targets.each do |target| 11 | target.build_configurations.each do |config| 12 | config.build_settings['SWIFT_VERSION'] = '3.0' 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -workspace Example/XProgressRing.xcworkspace -scheme XProgressRing-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XProgressRing/XProgressRing.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/XProgressRing 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/XProgressRing" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/XProgressRing/XProgressRing.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/XProgressRing" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/XProgressRing/XProgressRing.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/XProgressRing.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "XProgressRing", 3 | "version": "0.1.0", 4 | "summary": "A short description of XProgressRing.", 5 | "description": "TODO: Add long description of the pod here.", 6 | "homepage": "https://github.com//XProgressRing", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "Soubhi Hadri": "soubhi.hadri@gmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com//XProgressRing.git", 16 | "tag": "0.1.0" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "XProgressRing/Classes/**/*" 22 | } 23 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/XProgressRing" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/XProgressRing/XProgressRing.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "XProgressRing" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/XProgressRing" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/XProgressRing/XProgressRing.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "XProgressRing" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/XProgressRing/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | 4 | class Tests: XCTestCase { 5 | 6 | override func setUp() { 7 | super.setUp() 8 | // Put setup code here. This method is called before the invocation of each test method in the class. 9 | } 10 | 11 | override func tearDown() { 12 | // Put teardown code here. This method is called after the invocation of each test method in the class. 13 | super.tearDown() 14 | } 15 | 16 | func testExample() { 17 | // This is an example of a functional test case. 18 | XCTAssert(true, "Pass") 19 | } 20 | 21 | func testPerformanceExample() { 22 | // This is an example of a performance test case. 23 | self.measure() { 24 | // Put the code you want to measure the time of here. 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Example/XProgressRing/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // XProgressRing 4 | // 5 | // Created by Soubhi Hadri on 01/10/2017. 6 | // Copyright (c) 2017 Soubhi Hadri. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XProgressRing 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet var xProgressRing: XProgressRing! 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | print(self.view.frame) 18 | xProgressRing.addSeparableView(view: self.view); 19 | xProgressRing.startAnimation(ProgressMode: ProgressMode.quarterModeProgress); 20 | 21 | // xProgressRing.stopAnimation() 22 | 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/XProgressRing/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Soubhi Hadri 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/XProgressRing/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## XProgressRing 5 | 6 | Copyright (c) 2017 Soubhi Hadri 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /XProgressRing.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint XProgressRing.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'XProgressRing' 11 | s.version = '0.1.0' 12 | s.summary = 'A short description of XProgressRing.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | TODO: Add long description of the pod here. 22 | DESC 23 | 24 | s.homepage = 'https://github.com//XProgressRing' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'Soubhi Hadri' => 'soubhi.hadri@gmail.com' } 28 | s.source = { :git => 'https://github.com//XProgressRing.git', :tag => s.version.to_s } 29 | # s.social_media_url = 'https://twitter.com/' 30 | 31 | s.ios.deployment_target = '8.0' 32 | 33 | s.source_files = 'XProgressRing/Classes/**/*' 34 | 35 | # s.resource_bundles = { 36 | # 'XProgressRing' => ['XProgressRing/Assets/*.png'] 37 | # } 38 | 39 | # s.public_header_files = 'Pod/Classes/**/*.h' 40 | # s.frameworks = 'UIKit', 'MapKit' 41 | # s.dependency 'AFNetworking', '~> 2.3' 42 | end 43 | -------------------------------------------------------------------------------- /Example/XProgressRing/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // XProgressRing 4 | // 5 | // Created by Soubhi Hadri on 01/10/2017. 6 | // Copyright (c) 2017 Soubhi Hadri. 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: [UIApplicationLaunchOptionsKey: 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 throttle down OpenGL ES frame rates. 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 inactive 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 | 47 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2017 Soubhi Hadri <soubhi.hadri@gmail.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | XProgressRing 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - https://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /Example/XProgressRing/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "$BUILT_PRODUCTS_DIR/XProgressRing/XProgressRing.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "$BUILT_PRODUCTS_DIR/XProgressRing/XProgressRing.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # XProgressRing 2 | 3 | [![Version](https://img.shields.io/cocoapods/v/XProgressRing.svg?style=flat)](http://cocoapods.org/pods/XProgressRing) 4 | [![License](https://img.shields.io/cocoapods/l/XProgressRing.svg?style=flat)](http://cocoapods.org/pods/XProgressRing) 5 | [![Platform](https://img.shields.io/cocoapods/p/XProgressRing.svg?style=flat)](http://cocoapods.org/pods/XProgressRing) 6 | [![](http://img.shields.io/badge/iOS-8.0%2B-blue.svg)]() [![](http://img.shields.io/badge/Swift-3-blue.svg)]() 7 | [![](http://img.shields.io/badge/Swift-4-blue.svg)]() 8 | 9 | 10 | A simple customised ProgressView (LoadingView). 11 |
12 | It has three modes ;shown in the screenshots below :
13 | 1-fullModeProgress : just one circle that keeps rotating.
14 | 2-halfModeProgress : two circles.
15 | 3-quarterModeProgress : four circles.
16 | 17 | ## Screenshots 18 | 19 | 20 | 21 | 22 | ## Example 23 | 24 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 25 | 26 | ## Installation 27 | 28 | ### CocoaPods 29 | 30 | XProgressRing is available through [CocoaPods](http://cocoapods.org). To install 31 | it, simply add the following line to your Podfile: 32 | 33 | ```ruby 34 | pod "XProgressRing" 35 | ``` 36 | 37 | ### Manually 38 | just drag and drop into your project the files:
39 | 1-`KDCircularProgress.swift`.
40 | 2-`XProgressRing.swift`. 41 | 42 | ## Implementation 43 | After the installation, you can use it straight forward with xib/storyboard.
44 | 1-Drag and Drop View in your xib/storyboard and give constraints that you want . It is important to set the same value for width and height.
45 | 2-In the inpector set the custome class as "XProgressRing".
46 | 47 | 48 | 3-In the attribute inpector tab, set the value for:
49 |
    50 |
  • Raduis : raduis for the view. It is important to set this value the same as width and height to get rounded circle.
  • 51 |
  • Progress speed : the speed of cycling animation.
  • 52 |
  • Progress thickness : the thickness of animated track that keeps cycling.
  • 53 |
  • Progess Color : the color of the progess.
  • 54 |
  • BackgroundColor : the color of the view (the silent part in XProgressRing).
  • 55 |
56 |
57 | 58 | 4- After linking the view with @IBOutlet, you should call the following methodth @IBOutlet
59 | 60 | ```swift 61 | @IBOutlet var xProgressRing: XProgressRing! 62 | override func viewDidLoad() { 63 | super.viewDidLoad() 64 | xProgressRing.startAnimation(ProgressMode: ProgressMode.quarterModeProgress); 65 | 66 | } 67 | ``` 68 |
69 | In the `startAnimation` you should pass the mode for ProgressView (fullModeProgress ,halfModeProgress ,quarterModeProgress and the default one is `quarterModeProgress`). 70 |
71 | To stop the animation and hide progressView call: `stopAnimation()`. 72 |
73 | ## Important feature 74 | When the progressView is Displayed for the user; the interaction between the user and the components below the progressView should be forbidden, to implement this action, `addSeparableView` method can be invoked.
75 | 76 | ```swift 77 | xProgressRing.stopAnimation() 78 | ``` 79 |
80 | 81 | ## Dependencies 82 | 83 | KDCircularProgress 84 | 85 | ## License 86 | 87 | XProgressRing is available under the MIT license. See the LICENSE file for more info. 88 | -------------------------------------------------------------------------------- /Example/XProgressRing/Base.lproj/Main.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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Example/XProgressRing.xcodeproj/xcshareddata/xcschemes/XProgressRing-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | realpath() { 27 | DIRECTORY="$(cd "${1%/*}" && pwd)" 28 | FILENAME="${1##*/}" 29 | echo "$DIRECTORY/$FILENAME" 30 | } 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | realpath() { 27 | DIRECTORY="$(cd "${1%/*}" && pwd)" 28 | FILENAME="${1##*/}" 29 | echo "$DIRECTORY/$FILENAME" 30 | } 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /XProgressRing/Classes/XProgressRing.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomProgress.swift 3 | // CustomLoadingView 4 | // 5 | // Created by Soubhi Hadri on 1/1/17. 6 | // Copyright © 2016 Soubhi Hadri. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public enum ProgressMode { 12 | case fullModeProgress, halfModeProgress, quarterModeProgress 13 | } 14 | 15 | @IBDesignable 16 | public class XProgressRing: UIView { 17 | 18 | @IBInspectable var radius: CGFloat=100 { 19 | didSet { 20 | } 21 | } 22 | @IBInspectable var progress_thinkness:CGFloat=0.2{ 23 | didSet{ 24 | 25 | } 26 | } 27 | 28 | @IBInspectable var progress_speed:CGFloat=0.6; 29 | @IBInspectable var progress_color:UIColor=UIColor.white; 30 | 31 | private var progress1: KDCircularProgress! 32 | private var progress2: KDCircularProgress! 33 | private var progress3: KDCircularProgress! 34 | private var progress4: KDCircularProgress! 35 | private var separableView : UIView!; 36 | private var isAnimating: Bool = false; 37 | 38 | 39 | 40 | required override public init(frame: CGRect) { 41 | super.init(frame: frame) 42 | } 43 | 44 | 45 | 46 | required public init?(coder aDecoder: NSCoder) { 47 | super.init(coder: aDecoder) 48 | 49 | } 50 | 51 | func initialViews(){ 52 | print(self.frame); 53 | 54 | self.isHidden = true; 55 | 56 | let pFrame = CGRect(x: 0, y: 0, width: radius, height: radius); 57 | 58 | self.layer.cornerRadius = radius/CGFloat(2.0) 59 | self.clipsToBounds = true 60 | 61 | progress1 = KDCircularProgress(frame: pFrame) 62 | progress1.startAngle = 0 63 | progress1.progressThickness = self.progress_thinkness 64 | progress1.trackThickness = self.progress_thinkness 65 | progress1.clockwise = false 66 | progress1.gradientRotateSpeed = 2 67 | progress1.roundedCorners = true 68 | progress1.glowMode = .forward 69 | progress1.glowAmount = 0.9 70 | progress1.set(colors: progress_color); 71 | progress1.trackColor = UIColor.clear 72 | 73 | 74 | progress2 = KDCircularProgress(frame: pFrame) 75 | progress2.startAngle = 90 76 | progress2.progressThickness = self.progress_thinkness 77 | progress2.trackThickness = self.progress_thinkness 78 | progress2.clockwise = false 79 | progress2.gradientRotateSpeed = 2 80 | progress2.roundedCorners = true 81 | progress2.glowMode = .forward 82 | progress2.glowAmount = 0.9 83 | progress2.set(colors: progress_color); 84 | progress2.trackColor = UIColor.clear 85 | 86 | progress3 = KDCircularProgress(frame: pFrame) 87 | progress3.startAngle = 180 88 | progress3.progressThickness = self.progress_thinkness 89 | progress3.trackThickness = self.progress_thinkness 90 | progress3.clockwise = false 91 | progress3.gradientRotateSpeed = 2 92 | progress3.roundedCorners = true 93 | progress3.glowMode = .forward 94 | progress3.glowAmount = 0.9 95 | progress3.set(colors: progress_color); 96 | progress3.trackColor = UIColor.clear 97 | 98 | progress4 = KDCircularProgress(frame: pFrame) 99 | progress4.startAngle = 270 100 | progress4.progressThickness = self.progress_thinkness 101 | progress4.trackThickness = self.progress_thinkness 102 | progress4.clockwise = false 103 | progress4.gradientRotateSpeed = 2 104 | progress4.roundedCorners = true 105 | progress4.glowMode = .forward 106 | progress4.glowAmount = 0.9; 107 | progress4.trackColor = UIColor.clear; 108 | progress4.set(colors: progress_color); 109 | 110 | 111 | } 112 | 113 | private func addProgresses(progressMode:ProgressMode=ProgressMode.quarterModeProgress){ 114 | initialViews() 115 | self.addSubview(progress1) 116 | if progressMode==ProgressMode.quarterModeProgress { 117 | self.addSubview(progress2) 118 | self.addSubview(progress3) 119 | self.addSubview(progress4) 120 | }else if progressMode==ProgressMode.halfModeProgress { 121 | self.addSubview(progress3) 122 | }else{ 123 | } 124 | 125 | } 126 | 127 | public func addSeparableView(view:UIView){ 128 | separableView = UIView(frame: CGRect(x: 0, y: 0, width: view.frame.size.width, height: view.frame.size.height)); 129 | separableView.center.x = view.center.x; 130 | separableView.center.y = view.center.y; 131 | separableView.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.2); 132 | view.addSubview(separableView); 133 | view.bringSubview(toFront: self) 134 | } 135 | 136 | 137 | public func startAnimation(ProgressMode:ProgressMode=ProgressMode.quarterModeProgress){ 138 | addProgresses(progressMode: ProgressMode) 139 | isAnimating = true; 140 | self.isHidden = false; 141 | animate(progressMode: ProgressMode); 142 | } 143 | 144 | func animate(progressMode:ProgressMode=ProgressMode.quarterModeProgress){ 145 | if progressMode==ProgressMode.quarterModeProgress { 146 | 147 | self.progress1.animate(fromAngle:0, toAngle: 90, duration: TimeInterval(self.progress_speed)) { completed in 148 | if completed { 149 | 150 | if (!self.isAnimating){ 151 | return; 152 | } 153 | self.progress2.startAngle = 90 154 | self.progress1.isHidden = true; 155 | self.progress2.isHidden = false; 156 | self.progress2.animate(fromAngle:0, toAngle: 90, duration: TimeInterval(self.progress_speed)) { completed in 157 | if completed { 158 | self.progress1.startAngle = 0 159 | self.progress1.isHidden = false; 160 | self.progress2.isHidden = true; 161 | } else { 162 | } 163 | } 164 | if !self.isAnimating{ 165 | return; 166 | } 167 | 168 | } else { 169 | } 170 | } 171 | 172 | 173 | self.progress3.animate(fromAngle:0, toAngle: 90, duration: TimeInterval(self.progress_speed)) { completed in 174 | if completed { 175 | 176 | if !self.isAnimating{ 177 | return; 178 | } 179 | 180 | self.progress4.startAngle = 270 181 | self.progress3.isHidden = true; 182 | self.progress4.isHidden = false; 183 | self.progress4.animate(fromAngle:0, toAngle: 90, duration: TimeInterval(self.progress_speed)) { completed in 184 | if completed { 185 | self.progress3.startAngle = 180 186 | self.progress4.isHidden = true; 187 | self.progress3.isHidden = false; 188 | self.animate(progressMode:ProgressMode.quarterModeProgress); 189 | } else { 190 | } 191 | } 192 | 193 | if !self.isAnimating{ 194 | return; 195 | } 196 | 197 | 198 | 199 | } else { 200 | } 201 | } 202 | 203 | }else if progressMode==ProgressMode.halfModeProgress { 204 | self.progress1.animate(fromAngle:0, toAngle: 180, duration: TimeInterval(self.progress_speed)) { completed in 205 | if completed { 206 | 207 | if (!self.isAnimating){ 208 | return; 209 | } 210 | 211 | self.progress1.isHidden = true; 212 | self.progress3.startAngle = 180 213 | self.progress3.isHidden = false; 214 | self.progress3.animate(fromAngle:0, toAngle: 180, duration: TimeInterval(self.progress_speed)) { completed in 215 | if completed { 216 | self.progress1.startAngle = 0 217 | self.progress1.isHidden = false; 218 | self.progress3.isHidden = true; 219 | self.animate(progressMode: ProgressMode.halfModeProgress); 220 | } else { 221 | } 222 | } 223 | if !self.isAnimating{ 224 | return; 225 | } 226 | 227 | } else { 228 | } 229 | } 230 | 231 | }else{ 232 | self.progress1.animate(fromAngle:0, toAngle: 360, duration: TimeInterval(self.progress_speed)) { completed in 233 | if completed { 234 | self.progress1.startAngle=0; 235 | self.animate(progressMode: ProgressMode.fullModeProgress); 236 | } else { 237 | } 238 | } 239 | } 240 | 241 | 242 | 243 | 244 | 245 | } 246 | 247 | private func animateProgresses(progress1:KDCircularProgress,progress2:KDCircularProgress,toAngle:Double){ 248 | progress1.animate(fromAngle:0, toAngle: toAngle, duration: TimeInterval(self.progress_speed)) { completed in 249 | if completed { 250 | 251 | if (!self.isAnimating){ 252 | return; 253 | } 254 | 255 | progress1.isHidden = true; 256 | progress2.isHidden = false; 257 | progress2.animate(fromAngle:0, toAngle: toAngle, duration: TimeInterval(self.progress_speed)) { completed in 258 | if completed { 259 | progress1.isHidden = false; 260 | progress2.isHidden = true; 261 | // self.animate(); 262 | self.animateProgresses(progress1: self.progress1,progress2: self.progress2,toAngle: 90); 263 | self.animateProgresses(progress1: self.progress3,progress2: self.progress4,toAngle: 90); 264 | 265 | } else { 266 | } 267 | } 268 | if !self.isAnimating{ 269 | return; 270 | } 271 | 272 | } else { 273 | self.animateProgresses(progress1: self.progress1,progress2: self.progress2,toAngle: 90); 274 | self.animateProgresses(progress1: self.progress3,progress2: self.progress4,toAngle: 90); 275 | } 276 | } 277 | } 278 | 279 | public func stopAnimation(){ 280 | isAnimating = false; 281 | separableView.isHidden=true 282 | self.isHidden = true; 283 | } 284 | 285 | } 286 | -------------------------------------------------------------------------------- /XProgressRing/Classes/KDCircularProgress.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KDCircularProgress.swift 3 | // KDCircularProgress 4 | // 5 | // Created by Kaan Dedeoglu on 1/14/15. 6 | // Copyright (c) 2015 Kaan Dedeoglu. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public enum KDCircularProgressGlowMode { 12 | case forward, reverse, constant, noGlow 13 | } 14 | 15 | @IBDesignable 16 | public class KDCircularProgress: UIView, CAAnimationDelegate { 17 | 18 | private enum Conversion { 19 | static func degreesToRadians (value:CGFloat) -> CGFloat { 20 | return value * CGFloat.pi / 180.0 21 | } 22 | } 23 | 24 | private enum Utility { 25 | static func clamp(value: T, minMax: (T, T)) -> T { 26 | let (min, max) = minMax 27 | if value < min { 28 | return min 29 | } else if value > max { 30 | return max 31 | } else { 32 | return value 33 | } 34 | } 35 | 36 | static func inverseLerp(value: CGFloat, minMax: (CGFloat, CGFloat)) -> CGFloat { 37 | return (value - minMax.0) / (minMax.1 - minMax.0) 38 | } 39 | 40 | static func lerp(value: CGFloat, minMax: (CGFloat, CGFloat)) -> CGFloat { 41 | return (minMax.1 - minMax.0) * value + minMax.0 42 | } 43 | 44 | static func colorLerp(value: CGFloat, minMax: (UIColor, UIColor)) -> UIColor { 45 | let clampedValue = clamp(value: value, minMax: (0, 1)) 46 | 47 | let zero = CGFloat(0) 48 | 49 | var (r0, g0, b0, a0) = (zero, zero, zero, zero) 50 | minMax.0.getRed(&r0, green: &g0, blue: &b0, alpha: &a0) 51 | 52 | var (r1, g1, b1, a1) = (zero, zero, zero, zero) 53 | minMax.1.getRed(&r1, green: &g1, blue: &b1, alpha: &a1) 54 | 55 | return UIColor(red: lerp(value: clampedValue, minMax: (r0, r1)), green: lerp(value: clampedValue, minMax: (g0, g1)), blue: lerp(value: clampedValue, minMax: (b0, b1)), alpha: lerp(value: clampedValue, minMax: (a0, a1))) 56 | } 57 | 58 | static func mod(value: Double, range: Double, minMax: (Double, Double)) -> Double { 59 | let (min, max) = minMax 60 | assert(abs(range) <= abs(max - min), "range should be <= than the interval") 61 | if value >= min && value <= max { 62 | return value 63 | } else if value < min { 64 | return mod(value: value + range, range: range, minMax: minMax) 65 | } else { 66 | return mod(value: value - range, range: range, minMax: minMax) 67 | } 68 | } 69 | } 70 | 71 | private var progressLayer: KDCircularProgressViewLayer { 72 | get { 73 | return layer as! KDCircularProgressViewLayer 74 | } 75 | } 76 | 77 | private var radius: CGFloat = 0 { 78 | didSet { 79 | progressLayer.radius = radius 80 | } 81 | } 82 | 83 | public var progress: Double = 0 { 84 | didSet { 85 | let clampedProgress = Utility.clamp(value: progress, minMax: (0, 1)) 86 | angle = 360 * clampedProgress 87 | } 88 | } 89 | 90 | @IBInspectable public var angle: Double = 0 { 91 | didSet { 92 | if self.isAnimating() { 93 | self.pauseAnimation() 94 | } 95 | progressLayer.angle = angle 96 | } 97 | } 98 | 99 | @IBInspectable public var startAngle: Double = 0 { 100 | didSet { 101 | startAngle = Utility.mod(value: startAngle, range: 360, minMax: (0, 360)) 102 | progressLayer.startAngle = startAngle 103 | progressLayer.setNeedsDisplay() 104 | } 105 | } 106 | 107 | @IBInspectable public var clockwise: Bool = true { 108 | didSet { 109 | progressLayer.clockwise = clockwise 110 | progressLayer.setNeedsDisplay() 111 | } 112 | } 113 | 114 | @IBInspectable public var roundedCorners: Bool = true { 115 | didSet { 116 | progressLayer.roundedCorners = roundedCorners 117 | } 118 | } 119 | 120 | @IBInspectable public var lerpColorMode: Bool = false { 121 | didSet { 122 | progressLayer.lerpColorMode = lerpColorMode 123 | } 124 | } 125 | 126 | @IBInspectable public var gradientRotateSpeed: CGFloat = 0 { 127 | didSet { 128 | progressLayer.gradientRotateSpeed = gradientRotateSpeed 129 | } 130 | } 131 | 132 | @IBInspectable public var glowAmount: CGFloat = 1.0 {//Between 0 and 1 133 | didSet { 134 | glowAmount = Utility.clamp(value: glowAmount, minMax: (0, 1)) 135 | progressLayer.glowAmount = glowAmount 136 | } 137 | } 138 | 139 | @IBInspectable public var glowMode: KDCircularProgressGlowMode = .forward { 140 | didSet { 141 | progressLayer.glowMode = glowMode 142 | } 143 | } 144 | 145 | @IBInspectable public var progressThickness: CGFloat = 0.4 {//Between 0 and 1 146 | didSet { 147 | progressThickness = Utility.clamp(value: progressThickness, minMax: (0, 1)) 148 | progressLayer.progressThickness = progressThickness/2 149 | } 150 | } 151 | 152 | @IBInspectable public var trackThickness: CGFloat = 0.5 {//Between 0 and 1 153 | didSet { 154 | trackThickness = Utility.clamp(value: trackThickness, minMax: (0, 1)) 155 | progressLayer.trackThickness = trackThickness/2 156 | } 157 | } 158 | 159 | @IBInspectable public var trackColor: UIColor = .black { 160 | didSet { 161 | progressLayer.trackColor = trackColor 162 | progressLayer.setNeedsDisplay() 163 | } 164 | } 165 | 166 | @IBInspectable public var progressInsideFillColor: UIColor? = nil { 167 | didSet { 168 | progressLayer.progressInsideFillColor = progressInsideFillColor ?? .clear 169 | } 170 | } 171 | 172 | public var progressColors: [UIColor] { 173 | get { 174 | return progressLayer.colorsArray 175 | } 176 | 177 | set { 178 | set(colors: newValue) 179 | } 180 | } 181 | 182 | //These are used only from the Interface-Builder. Changing these from code will have no effect. 183 | //Also IB colors are limited to 3, whereas programatically we can have an arbitrary number of them. 184 | @objc @IBInspectable private var IBColor1: UIColor? 185 | @objc @IBInspectable private var IBColor2: UIColor? 186 | @objc @IBInspectable private var IBColor3: UIColor? 187 | 188 | private var animationCompletionBlock: ((Bool) -> Void)? 189 | 190 | override public init(frame: CGRect) { 191 | super.init(frame: frame) 192 | setInitialValues() 193 | refreshValues() 194 | checkAndSetIBColors() 195 | } 196 | 197 | convenience public init(frame:CGRect, colors: UIColor...) { 198 | self.init(frame: frame) 199 | set(colors: colors) 200 | } 201 | 202 | required public init(coder aDecoder: NSCoder) { 203 | super.init(coder: aDecoder)! 204 | translatesAutoresizingMaskIntoConstraints = false 205 | setInitialValues() 206 | refreshValues() 207 | } 208 | 209 | public override func awakeFromNib() { 210 | checkAndSetIBColors() 211 | } 212 | 213 | override public class var layerClass: AnyClass { 214 | return KDCircularProgressViewLayer.self 215 | } 216 | 217 | public override func layoutSubviews() { 218 | super.layoutSubviews() 219 | radius = (frame.size.width/2.0) * 0.8 220 | } 221 | 222 | private func setInitialValues() { 223 | radius = (frame.size.width/2.0) * 0.8 //We always apply a 20% padding, stopping glows from being clipped 224 | backgroundColor = .clear 225 | set(colors: .white, .cyan) 226 | } 227 | 228 | private func refreshValues() { 229 | progressLayer.angle = angle 230 | progressLayer.startAngle = startAngle 231 | progressLayer.clockwise = clockwise 232 | progressLayer.roundedCorners = roundedCorners 233 | progressLayer.lerpColorMode = lerpColorMode 234 | progressLayer.gradientRotateSpeed = gradientRotateSpeed 235 | progressLayer.glowAmount = glowAmount 236 | progressLayer.glowMode = glowMode 237 | progressLayer.progressThickness = progressThickness/2 238 | progressLayer.trackColor = trackColor 239 | progressLayer.trackThickness = trackThickness/2 240 | } 241 | 242 | private func checkAndSetIBColors() { 243 | let nonNilColors = [IBColor1, IBColor2, IBColor3].flatMap { $0 } 244 | if !nonNilColors.isEmpty { 245 | set(colors: nonNilColors) 246 | } 247 | } 248 | 249 | public func set(colors: UIColor...) { 250 | set(colors: colors) 251 | } 252 | 253 | private func set(colors: [UIColor]) { 254 | progressLayer.colorsArray = colors 255 | progressLayer.setNeedsDisplay() 256 | } 257 | 258 | public func animate(fromAngle: Double, toAngle: Double, duration: TimeInterval, relativeDuration: Bool = true, completion: ((Bool) -> Void)?) { 259 | if isAnimating() { 260 | pauseAnimation() 261 | } 262 | 263 | let animationDuration: TimeInterval 264 | if relativeDuration { 265 | animationDuration = duration 266 | } else { 267 | let traveledAngle = Utility.mod(value: toAngle - fromAngle, range: 360, minMax: (0, 360)) 268 | let scaledDuration = (TimeInterval(traveledAngle) * duration) / 360 269 | animationDuration = scaledDuration 270 | } 271 | 272 | let animation = CABasicAnimation(keyPath: "angle") 273 | animation.fromValue = fromAngle 274 | animation.toValue = toAngle 275 | animation.duration = animationDuration 276 | animation.delegate = self 277 | animation.isRemovedOnCompletion = false 278 | angle = toAngle 279 | animationCompletionBlock = completion 280 | 281 | progressLayer.add(animation, forKey: "angle") 282 | } 283 | 284 | public func animate(toAngle: Double, duration: TimeInterval, relativeDuration: Bool = true, completion: ((Bool) -> Void)?) { 285 | if isAnimating() { 286 | pauseAnimation() 287 | } 288 | animate(fromAngle: angle, toAngle: toAngle, duration: duration, relativeDuration: relativeDuration, completion: completion) 289 | } 290 | 291 | public func pauseAnimation() { 292 | guard let presentationLayer = progressLayer.presentation() else { return } 293 | 294 | let currentValue = presentationLayer.angle 295 | progressLayer.removeAllAnimations() 296 | angle = currentValue 297 | } 298 | 299 | public func stopAnimation() { 300 | progressLayer.removeAllAnimations() 301 | angle = 0 302 | } 303 | 304 | public func isAnimating() -> Bool { 305 | return progressLayer.animation(forKey: "angle") != nil 306 | } 307 | 308 | public func animationDidStop(_ anim: CAAnimation, finished flag: Bool) { 309 | if let completionBlock = animationCompletionBlock { 310 | animationCompletionBlock = nil 311 | completionBlock(flag) 312 | } 313 | } 314 | 315 | public override func didMoveToWindow() { 316 | if let window = window { 317 | progressLayer.contentsScale = window.screen.scale 318 | } 319 | } 320 | 321 | public override func willMove(toSuperview newSuperview: UIView?) { 322 | if newSuperview == nil && isAnimating() { 323 | pauseAnimation() 324 | } 325 | } 326 | 327 | public override func prepareForInterfaceBuilder() { 328 | setInitialValues() 329 | refreshValues() 330 | checkAndSetIBColors() 331 | progressLayer.setNeedsDisplay() 332 | } 333 | 334 | private class KDCircularProgressViewLayer: CALayer { 335 | @NSManaged var angle: Double 336 | var radius: CGFloat = 0 { 337 | didSet { 338 | invalidateGradientCache() 339 | } 340 | } 341 | var startAngle: Double = 0 342 | var clockwise: Bool = true { 343 | didSet { 344 | if clockwise != oldValue { 345 | invalidateGradientCache() 346 | } 347 | } 348 | } 349 | var roundedCorners: Bool = true 350 | var lerpColorMode: Bool = false 351 | var gradientRotateSpeed: CGFloat = 0 { 352 | didSet { 353 | invalidateGradientCache() 354 | } 355 | } 356 | var glowAmount: CGFloat = 0 357 | var glowMode: KDCircularProgressGlowMode = .forward 358 | var progressThickness: CGFloat = 0.5 359 | var trackThickness: CGFloat = 0.5 360 | var trackColor: UIColor = .black 361 | var progressInsideFillColor: UIColor = .clear 362 | var colorsArray: [UIColor] = [] { 363 | didSet { 364 | invalidateGradientCache() 365 | } 366 | } 367 | private var gradientCache: CGGradient? 368 | private var locationsCache: [CGFloat]? 369 | 370 | private enum GlowConstants { 371 | private static let sizeToGlowRatio: CGFloat = 0.00015 372 | static func glowAmount(forAngle angle: Double, glowAmount: CGFloat, glowMode: KDCircularProgressGlowMode, size: CGFloat) -> CGFloat { 373 | switch glowMode { 374 | case .forward: 375 | return CGFloat(angle) * size * sizeToGlowRatio * glowAmount 376 | case .reverse: 377 | return CGFloat(360 - angle) * size * sizeToGlowRatio * glowAmount 378 | case .constant: 379 | return 360 * size * sizeToGlowRatio * glowAmount 380 | default: 381 | return 0 382 | } 383 | } 384 | } 385 | 386 | override class func needsDisplay(forKey key: String) -> Bool { 387 | return key == "angle" ? true : super.needsDisplay(forKey: key) 388 | } 389 | 390 | override init(layer: Any) { 391 | super.init(layer: layer) 392 | let progressLayer = layer as! KDCircularProgressViewLayer 393 | radius = progressLayer.radius 394 | angle = progressLayer.angle 395 | startAngle = progressLayer.startAngle 396 | clockwise = progressLayer.clockwise 397 | roundedCorners = progressLayer.roundedCorners 398 | lerpColorMode = progressLayer.lerpColorMode 399 | gradientRotateSpeed = progressLayer.gradientRotateSpeed 400 | glowAmount = progressLayer.glowAmount 401 | glowMode = progressLayer.glowMode 402 | progressThickness = progressLayer.progressThickness 403 | trackThickness = progressLayer.trackThickness 404 | trackColor = progressLayer.trackColor 405 | colorsArray = progressLayer.colorsArray 406 | progressInsideFillColor = progressLayer.progressInsideFillColor 407 | } 408 | 409 | override init() { 410 | super.init() 411 | } 412 | 413 | required init?(coder aDecoder: NSCoder) { 414 | super.init(coder: aDecoder) 415 | } 416 | 417 | override func draw(in ctx: CGContext) { 418 | UIGraphicsPushContext(ctx) 419 | 420 | let size = bounds.size 421 | let width = size.width 422 | let height = size.height 423 | 424 | let trackLineWidth = radius * trackThickness 425 | let progressLineWidth = radius * progressThickness 426 | let arcRadius = max(radius - trackLineWidth/2, radius - progressLineWidth/2) 427 | ctx.addArc(center: CGPoint(x: width/2.0, y: height/2.0), radius: arcRadius, startAngle: 0, endAngle: CGFloat.pi * 2, clockwise: false) 428 | trackColor.set() 429 | ctx.setStrokeColor(trackColor.cgColor) 430 | ctx.setFillColor(progressInsideFillColor.cgColor) 431 | ctx.setLineWidth(trackLineWidth) 432 | ctx.setLineCap(CGLineCap.butt) 433 | ctx.drawPath(using: .fillStroke) 434 | 435 | UIGraphicsBeginImageContextWithOptions(size, false, 0.0) 436 | 437 | let imageCtx = UIGraphicsGetCurrentContext() 438 | let reducedAngle = Utility.mod(value: angle, range: 360, minMax: (0, 360)) 439 | let fromAngle = Conversion.degreesToRadians(value: CGFloat(-startAngle)) 440 | let toAngle = Conversion.degreesToRadians(value: CGFloat((clockwise == true ? -reducedAngle : reducedAngle) - startAngle)) 441 | 442 | imageCtx?.addArc(center: CGPoint(x: width/2.0, y: height/2.0), radius: arcRadius, startAngle: fromAngle, endAngle: toAngle, clockwise: clockwise) 443 | 444 | let glowValue = GlowConstants.glowAmount(forAngle: reducedAngle, glowAmount: glowAmount, glowMode: glowMode, size: width) 445 | if glowValue > 0 { 446 | imageCtx?.setShadow(offset: CGSize.zero, blur: glowValue, color: UIColor.black.cgColor) 447 | } 448 | 449 | let linecap: CGLineCap = roundedCorners == true ? .round : .butt 450 | imageCtx?.setLineCap(linecap) 451 | imageCtx?.setLineWidth(progressLineWidth) 452 | imageCtx?.drawPath(using: .stroke) 453 | 454 | let drawMask: CGImage = UIGraphicsGetCurrentContext()!.makeImage()! 455 | UIGraphicsEndImageContext() 456 | 457 | ctx.saveGState() 458 | ctx.clip(to: bounds, mask: drawMask) 459 | 460 | //Gradient - Fill 461 | if !lerpColorMode && colorsArray.count > 1 { 462 | let rgbColorsArray: [UIColor] = colorsArray.map { color in // Make sure every color in colors array is in RGB color space 463 | if color.cgColor.numberOfComponents == 2 { 464 | if let whiteValue = color.cgColor.components?[0] { 465 | return UIColor(red: whiteValue, green: whiteValue, blue: whiteValue, alpha: 1.0) 466 | } else { 467 | return UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0) 468 | } 469 | } else { 470 | return color 471 | } 472 | } 473 | 474 | let componentsArray = rgbColorsArray.flatMap { color -> [CGFloat] in 475 | guard let components = color.cgColor.components else { return [] } 476 | return [components[0], components[1], components[2], 1.0] 477 | } 478 | 479 | drawGradientWith(context: ctx, componentsArray: componentsArray) 480 | } else { 481 | var color: UIColor? 482 | if colorsArray.isEmpty { 483 | color = UIColor.white 484 | } else if colorsArray.count == 1 { 485 | color = colorsArray[0] 486 | } else { 487 | // lerpColorMode is true 488 | let t = CGFloat(reducedAngle) / 360 489 | let steps = colorsArray.count - 1 490 | let step = 1 / CGFloat(steps) 491 | for i in 1...steps { 492 | let fi = CGFloat(i) 493 | if (t <= fi * step || i == steps) { 494 | let colorT = Utility.inverseLerp(value: t, minMax: ((fi - 1) * step, fi * step)) 495 | color = Utility.colorLerp(value: colorT, minMax: (colorsArray[i - 1], colorsArray[i])) 496 | break 497 | } 498 | } 499 | } 500 | 501 | if let color = color { 502 | fillRectWith(context: ctx, color: color) 503 | } 504 | } 505 | ctx.restoreGState() 506 | UIGraphicsPopContext() 507 | } 508 | 509 | private func fillRectWith(context: CGContext!, color: UIColor) { 510 | context.setFillColor(color.cgColor) 511 | context.fill(bounds) 512 | } 513 | 514 | private func drawGradientWith(context: CGContext!, componentsArray: [CGFloat]) { 515 | let baseSpace = CGColorSpaceCreateDeviceRGB() 516 | let locations = locationsCache ?? gradientLocationsFor(colorCount: componentsArray.count/4, gradientWidth: bounds.size.width) 517 | let gradient: CGGradient 518 | 519 | if let cachedGradient = gradientCache { 520 | gradient = cachedGradient 521 | } else { 522 | guard let cachedGradient = CGGradient(colorSpace: baseSpace, colorComponents: componentsArray, locations: locations, count: componentsArray.count/4) else { 523 | return 524 | } 525 | 526 | gradientCache = cachedGradient 527 | gradient = cachedGradient 528 | } 529 | 530 | let halfX = bounds.size.width / 2.0 531 | let floatPi = CGFloat.pi 532 | let rotateSpeed = clockwise == true ? gradientRotateSpeed : gradientRotateSpeed * -1 533 | let angleInRadians = Conversion.degreesToRadians(value: rotateSpeed * CGFloat(angle) - 90) 534 | let oppositeAngle = angleInRadians > floatPi ? angleInRadians - floatPi : angleInRadians + floatPi 535 | 536 | let startPoint = CGPoint(x: (cos(angleInRadians) * halfX) + halfX, y: (sin(angleInRadians) * halfX) + halfX) 537 | let endPoint = CGPoint(x: (cos(oppositeAngle) * halfX) + halfX, y: (sin(oppositeAngle) * halfX) + halfX) 538 | 539 | context.drawLinearGradient(gradient, start: startPoint, end: endPoint, options: .drawsBeforeStartLocation) 540 | } 541 | 542 | private func gradientLocationsFor(colorCount: Int, gradientWidth: CGFloat) -> [CGFloat] { 543 | if colorCount == 0 || gradientWidth == 0 { 544 | return [] 545 | } else { 546 | let progressLineWidth = radius * progressThickness 547 | let firstPoint = gradientWidth/2 - (radius - progressLineWidth/2) 548 | let increment = (gradientWidth - (2*firstPoint))/CGFloat(colorCount - 1) 549 | 550 | let locationsArray = (0.. /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 295 | showEnvVarsInLog = 0; 296 | }; 297 | 71F2AB4930E4015848135B3A /* [CP] Embed Pods Frameworks */ = { 298 | isa = PBXShellScriptBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | ); 302 | inputPaths = ( 303 | ); 304 | name = "[CP] Embed Pods Frameworks"; 305 | outputPaths = ( 306 | ); 307 | runOnlyForDeploymentPostprocessing = 0; 308 | shellPath = /bin/sh; 309 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests-frameworks.sh\"\n"; 310 | showEnvVarsInLog = 0; 311 | }; 312 | 8E44E7FCD616B48FFB8C697F /* [CP] Check Pods Manifest.lock */ = { 313 | isa = PBXShellScriptBuildPhase; 314 | buildActionMask = 2147483647; 315 | files = ( 316 | ); 317 | inputPaths = ( 318 | ); 319 | name = "[CP] Check Pods Manifest.lock"; 320 | outputPaths = ( 321 | ); 322 | runOnlyForDeploymentPostprocessing = 0; 323 | shellPath = /bin/sh; 324 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 325 | showEnvVarsInLog = 0; 326 | }; 327 | 9E05444EC051B884EBB231FA /* [CP] Copy Pods Resources */ = { 328 | isa = PBXShellScriptBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | ); 332 | inputPaths = ( 333 | ); 334 | name = "[CP] Copy Pods Resources"; 335 | outputPaths = ( 336 | ); 337 | runOnlyForDeploymentPostprocessing = 0; 338 | shellPath = /bin/sh; 339 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example-resources.sh\"\n"; 340 | showEnvVarsInLog = 0; 341 | }; 342 | A3AF7FF9CAB6F633F235A8E8 /* [CP] Copy Pods Resources */ = { 343 | isa = PBXShellScriptBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | inputPaths = ( 348 | ); 349 | name = "[CP] Copy Pods Resources"; 350 | outputPaths = ( 351 | ); 352 | runOnlyForDeploymentPostprocessing = 0; 353 | shellPath = /bin/sh; 354 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests-resources.sh\"\n"; 355 | showEnvVarsInLog = 0; 356 | }; 357 | /* End PBXShellScriptBuildPhase section */ 358 | 359 | /* Begin PBXSourcesBuildPhase section */ 360 | 607FACCC1AFB9204008FA782 /* Sources */ = { 361 | isa = PBXSourcesBuildPhase; 362 | buildActionMask = 2147483647; 363 | files = ( 364 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 365 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | }; 369 | 607FACE11AFB9204008FA782 /* Sources */ = { 370 | isa = PBXSourcesBuildPhase; 371 | buildActionMask = 2147483647; 372 | files = ( 373 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 374 | ); 375 | runOnlyForDeploymentPostprocessing = 0; 376 | }; 377 | /* End PBXSourcesBuildPhase section */ 378 | 379 | /* Begin PBXTargetDependency section */ 380 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 381 | isa = PBXTargetDependency; 382 | target = 607FACCF1AFB9204008FA782 /* XProgressRing_Example */; 383 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 384 | }; 385 | /* End PBXTargetDependency section */ 386 | 387 | /* Begin PBXVariantGroup section */ 388 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 389 | isa = PBXVariantGroup; 390 | children = ( 391 | 607FACDA1AFB9204008FA782 /* Base */, 392 | ); 393 | name = Main.storyboard; 394 | sourceTree = ""; 395 | }; 396 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 397 | isa = PBXVariantGroup; 398 | children = ( 399 | 607FACDF1AFB9204008FA782 /* Base */, 400 | ); 401 | name = LaunchScreen.xib; 402 | sourceTree = ""; 403 | }; 404 | /* End PBXVariantGroup section */ 405 | 406 | /* Begin XCBuildConfiguration section */ 407 | 607FACED1AFB9204008FA782 /* Debug */ = { 408 | isa = XCBuildConfiguration; 409 | buildSettings = { 410 | ALWAYS_SEARCH_USER_PATHS = NO; 411 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 412 | CLANG_CXX_LIBRARY = "libc++"; 413 | CLANG_ENABLE_MODULES = YES; 414 | CLANG_ENABLE_OBJC_ARC = YES; 415 | CLANG_WARN_BOOL_CONVERSION = YES; 416 | CLANG_WARN_CONSTANT_CONVERSION = YES; 417 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 418 | CLANG_WARN_EMPTY_BODY = YES; 419 | CLANG_WARN_ENUM_CONVERSION = YES; 420 | CLANG_WARN_INT_CONVERSION = YES; 421 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 422 | CLANG_WARN_UNREACHABLE_CODE = YES; 423 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 424 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 425 | COPY_PHASE_STRIP = NO; 426 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 427 | ENABLE_STRICT_OBJC_MSGSEND = YES; 428 | ENABLE_TESTABILITY = YES; 429 | GCC_C_LANGUAGE_STANDARD = gnu99; 430 | GCC_DYNAMIC_NO_PIC = NO; 431 | GCC_NO_COMMON_BLOCKS = YES; 432 | GCC_OPTIMIZATION_LEVEL = 0; 433 | GCC_PREPROCESSOR_DEFINITIONS = ( 434 | "DEBUG=1", 435 | "$(inherited)", 436 | ); 437 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 438 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 439 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 440 | GCC_WARN_UNDECLARED_SELECTOR = YES; 441 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 442 | GCC_WARN_UNUSED_FUNCTION = YES; 443 | GCC_WARN_UNUSED_VARIABLE = YES; 444 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 445 | MTL_ENABLE_DEBUG_INFO = YES; 446 | ONLY_ACTIVE_ARCH = YES; 447 | SDKROOT = iphoneos; 448 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 449 | }; 450 | name = Debug; 451 | }; 452 | 607FACEE1AFB9204008FA782 /* Release */ = { 453 | isa = XCBuildConfiguration; 454 | buildSettings = { 455 | ALWAYS_SEARCH_USER_PATHS = NO; 456 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 457 | CLANG_CXX_LIBRARY = "libc++"; 458 | CLANG_ENABLE_MODULES = YES; 459 | CLANG_ENABLE_OBJC_ARC = YES; 460 | CLANG_WARN_BOOL_CONVERSION = YES; 461 | CLANG_WARN_CONSTANT_CONVERSION = YES; 462 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 463 | CLANG_WARN_EMPTY_BODY = YES; 464 | CLANG_WARN_ENUM_CONVERSION = YES; 465 | CLANG_WARN_INT_CONVERSION = YES; 466 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 467 | CLANG_WARN_UNREACHABLE_CODE = YES; 468 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 469 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 470 | COPY_PHASE_STRIP = NO; 471 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 472 | ENABLE_NS_ASSERTIONS = NO; 473 | ENABLE_STRICT_OBJC_MSGSEND = YES; 474 | GCC_C_LANGUAGE_STANDARD = gnu99; 475 | GCC_NO_COMMON_BLOCKS = YES; 476 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 477 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 478 | GCC_WARN_UNDECLARED_SELECTOR = YES; 479 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 480 | GCC_WARN_UNUSED_FUNCTION = YES; 481 | GCC_WARN_UNUSED_VARIABLE = YES; 482 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 483 | MTL_ENABLE_DEBUG_INFO = NO; 484 | SDKROOT = iphoneos; 485 | VALIDATE_PRODUCT = YES; 486 | }; 487 | name = Release; 488 | }; 489 | 607FACF01AFB9204008FA782 /* Debug */ = { 490 | isa = XCBuildConfiguration; 491 | baseConfigurationReference = 3D794F0B1BB69A247614D7C3 /* Pods-XProgressRing_Example.debug.xcconfig */; 492 | buildSettings = { 493 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 494 | INFOPLIST_FILE = XProgressRing/Info.plist; 495 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 496 | MODULE_NAME = ExampleApp; 497 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | SWIFT_VERSION = 3.0; 500 | }; 501 | name = Debug; 502 | }; 503 | 607FACF11AFB9204008FA782 /* Release */ = { 504 | isa = XCBuildConfiguration; 505 | baseConfigurationReference = EE5F4BA68922DF73475B1374 /* Pods-XProgressRing_Example.release.xcconfig */; 506 | buildSettings = { 507 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 508 | INFOPLIST_FILE = XProgressRing/Info.plist; 509 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 510 | MODULE_NAME = ExampleApp; 511 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 512 | PRODUCT_NAME = "$(TARGET_NAME)"; 513 | SWIFT_VERSION = 3.0; 514 | }; 515 | name = Release; 516 | }; 517 | 607FACF31AFB9204008FA782 /* Debug */ = { 518 | isa = XCBuildConfiguration; 519 | baseConfigurationReference = A9A20796728FF6A4212CFDDA /* Pods-XProgressRing_Tests.debug.xcconfig */; 520 | buildSettings = { 521 | FRAMEWORK_SEARCH_PATHS = ( 522 | "$(SDKROOT)/Developer/Library/Frameworks", 523 | "$(inherited)", 524 | ); 525 | GCC_PREPROCESSOR_DEFINITIONS = ( 526 | "DEBUG=1", 527 | "$(inherited)", 528 | ); 529 | INFOPLIST_FILE = Tests/Info.plist; 530 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 531 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 532 | PRODUCT_NAME = "$(TARGET_NAME)"; 533 | SWIFT_VERSION = 3.0; 534 | }; 535 | name = Debug; 536 | }; 537 | 607FACF41AFB9204008FA782 /* Release */ = { 538 | isa = XCBuildConfiguration; 539 | baseConfigurationReference = 2FF8D4C0E8D743C7E43188BD /* Pods-XProgressRing_Tests.release.xcconfig */; 540 | buildSettings = { 541 | FRAMEWORK_SEARCH_PATHS = ( 542 | "$(SDKROOT)/Developer/Library/Frameworks", 543 | "$(inherited)", 544 | ); 545 | INFOPLIST_FILE = Tests/Info.plist; 546 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 547 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 548 | PRODUCT_NAME = "$(TARGET_NAME)"; 549 | SWIFT_VERSION = 3.0; 550 | }; 551 | name = Release; 552 | }; 553 | /* End XCBuildConfiguration section */ 554 | 555 | /* Begin XCConfigurationList section */ 556 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "XProgressRing" */ = { 557 | isa = XCConfigurationList; 558 | buildConfigurations = ( 559 | 607FACED1AFB9204008FA782 /* Debug */, 560 | 607FACEE1AFB9204008FA782 /* Release */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "XProgressRing_Example" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 607FACF01AFB9204008FA782 /* Debug */, 569 | 607FACF11AFB9204008FA782 /* Release */, 570 | ); 571 | defaultConfigurationIsVisible = 0; 572 | defaultConfigurationName = Release; 573 | }; 574 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "XProgressRing_Tests" */ = { 575 | isa = XCConfigurationList; 576 | buildConfigurations = ( 577 | 607FACF31AFB9204008FA782 /* Debug */, 578 | 607FACF41AFB9204008FA782 /* Release */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | /* End XCConfigurationList section */ 584 | }; 585 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 586 | } 587 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 022A1678B1054ED3A1C9E3F9F8A4B6E3 /* XProgressRing-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 207CA4AB7E67AC216B8575922A8B436C /* XProgressRing-dummy.m */; }; 11 | 049D592FCC3A5760FDD0B6426416BC53 /* Pods-XProgressRing_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 655DD82664882C99E27103935459B614 /* Pods-XProgressRing_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 1E4D2087D96FEB0BB5AD9992EC5C05AE /* KDCircularProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = F09742D1E3CA0CC525B455DAFBE89137 /* KDCircularProgress.swift */; }; 13 | 3C02C51F1694901A308362D4378A0C99 /* Pods-XProgressRing_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CD8040A63BEE3BE10C57B864730A2E /* Pods-XProgressRing_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 5482C35E0608D128E6FC5A71C5AC7418 /* Pods-XProgressRing_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 64BC8A0C74088F186B17ED06FDAEFBEA /* Pods-XProgressRing_Example-dummy.m */; }; 15 | 5A70FA857B873D3DF79162A4BA58A5C2 /* XProgressRing-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 500C10B40DA4E3C05A215B6CBA56B841 /* XProgressRing-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 6A683051560E1B277153F62137944774 /* ReplaceMe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A52F04D864D1C5720A91A5A1E77D27 /* ReplaceMe.swift */; }; 17 | A1A2C3FF0E399CA7EB7C06C95A3BACF6 /* Pods-XProgressRing_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = ABE1E91E2AF1A54C2840DFA51D59E397 /* Pods-XProgressRing_Tests-dummy.m */; }; 18 | B8329A5987734B69CB0AA591192EDC72 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEC22C73C1608DFA5D5D78BDCB218219 /* Foundation.framework */; }; 19 | BC6B1AEB3362EC74323DAD7269AF282D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEC22C73C1608DFA5D5D78BDCB218219 /* Foundation.framework */; }; 20 | E164A1C8501103570BB90996CE51AFAE /* XProgressRing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0519CC0F8F347A8066A6F4407EC45B02 /* XProgressRing.swift */; }; 21 | E1AC0F25293CEF3BC057AAD0B6AEE9E3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEC22C73C1608DFA5D5D78BDCB218219 /* Foundation.framework */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | 9761CBEB929BDCFB403B245AA25A25A8 /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 1FAE700A7A4C913BE4008E492FB1582A; 30 | remoteInfo = XProgressRing; 31 | }; 32 | /* End PBXContainerItemProxy section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 03A52F04D864D1C5720A91A5A1E77D27 /* ReplaceMe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReplaceMe.swift; sourceTree = ""; }; 36 | 0519CC0F8F347A8066A6F4407EC45B02 /* XProgressRing.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = XProgressRing.swift; sourceTree = ""; }; 37 | 08CD8040A63BEE3BE10C57B864730A2E /* Pods-XProgressRing_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-XProgressRing_Example-umbrella.h"; sourceTree = ""; }; 38 | 0E9FB8A90FF7D96CDF998606EF3BEE8C /* Pods-XProgressRing_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-XProgressRing_Tests-frameworks.sh"; sourceTree = ""; }; 39 | 139EAFC64D3C5E65F50ED25F8BFCAD63 /* Pods-XProgressRing_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-XProgressRing_Example-resources.sh"; sourceTree = ""; }; 40 | 18B73D378D92334DC78F2219F624E395 /* Pods-XProgressRing_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XProgressRing_Example.debug.xcconfig"; sourceTree = ""; }; 41 | 1A9900A31A614DE09277817D15B8F29E /* Pods-XProgressRing_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XProgressRing_Tests.debug.xcconfig"; sourceTree = ""; }; 42 | 1DE0CE5B1BC7EFA0549A475212F70C04 /* Pods_XProgressRing_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_XProgressRing_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 207CA4AB7E67AC216B8575922A8B436C /* XProgressRing-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "XProgressRing-dummy.m"; sourceTree = ""; }; 44 | 357C994AE97373C865952831E24B9C9F /* Pods-XProgressRing_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-XProgressRing_Tests-resources.sh"; sourceTree = ""; }; 45 | 41E08CA0E67867808E762334A44A236B /* Pods-XProgressRing_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-XProgressRing_Tests-acknowledgements.plist"; sourceTree = ""; }; 46 | 474D2C72335AE6C5B2FE6D2CCDEB5A78 /* XProgressRing.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = XProgressRing.xcconfig; sourceTree = ""; }; 47 | 480B582B317C60DAD505A22A9902D0E2 /* XProgressRing-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XProgressRing-prefix.pch"; sourceTree = ""; }; 48 | 4F74D0CEC94FF40DCDC2215E8ED29DAC /* Pods-XProgressRing_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-XProgressRing_Example.modulemap"; sourceTree = ""; }; 49 | 500C10B40DA4E3C05A215B6CBA56B841 /* XProgressRing-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "XProgressRing-umbrella.h"; sourceTree = ""; }; 50 | 5824F8003332330CFB0A4D1F34D601D2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 64BC8A0C74088F186B17ED06FDAEFBEA /* Pods-XProgressRing_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-XProgressRing_Example-dummy.m"; sourceTree = ""; }; 52 | 655DD82664882C99E27103935459B614 /* Pods-XProgressRing_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-XProgressRing_Tests-umbrella.h"; sourceTree = ""; }; 53 | 689EDACA83119B3787253B81C6BEFA06 /* Pods-XProgressRing_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XProgressRing_Example.release.xcconfig"; sourceTree = ""; }; 54 | 8335098FA113C16EE644E4AECF46BACD /* XProgressRing.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = XProgressRing.modulemap; sourceTree = ""; }; 55 | 9125AF13F92D059EB5B03A9350F2AB69 /* Pods-XProgressRing_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-XProgressRing_Tests-acknowledgements.markdown"; sourceTree = ""; }; 56 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 57 | 94F8D16F619077AF14826B9727E043CB /* Pods-XProgressRing_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-XProgressRing_Tests.modulemap"; sourceTree = ""; }; 58 | 9ADDF65557DFB45189279A856DD4375F /* Pods-XProgressRing_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-XProgressRing_Example-frameworks.sh"; sourceTree = ""; }; 59 | 9CFF87D7CD5DC5812838DA15A0B1DEA1 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | ABE1E91E2AF1A54C2840DFA51D59E397 /* Pods-XProgressRing_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-XProgressRing_Tests-dummy.m"; sourceTree = ""; }; 61 | B5B98714D7202F773A4F987FE3ED40F0 /* Pods-XProgressRing_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-XProgressRing_Example-acknowledgements.plist"; sourceTree = ""; }; 62 | C2853809764DE38353E45BBAB18B4A98 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 63 | C2EB42016663B5457A99888D40E634CC /* Pods-XProgressRing_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-XProgressRing_Tests.release.xcconfig"; sourceTree = ""; }; 64 | CEC22C73C1608DFA5D5D78BDCB218219 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 65 | CF2A8FE91B9874373CF2F46AC822C1E8 /* XProgressRing.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = XProgressRing.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 66 | E1928B4CD097733B3A4CB71F0C688426 /* Pods_XProgressRing_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_XProgressRing_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | F09742D1E3CA0CC525B455DAFBE89137 /* KDCircularProgress.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = KDCircularProgress.swift; sourceTree = ""; }; 68 | F9DA430ED1410574FCFC17DEC9C12492 /* Pods-XProgressRing_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-XProgressRing_Example-acknowledgements.markdown"; sourceTree = ""; }; 69 | /* End PBXFileReference section */ 70 | 71 | /* Begin PBXFrameworksBuildPhase section */ 72 | 2503047BBCE57BA3EF8E241436471CF7 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | E1AC0F25293CEF3BC057AAD0B6AEE9E3 /* Foundation.framework in Frameworks */, 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | 7AF3A8069CD5CD688B1DDFE1589AC828 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | B8329A5987734B69CB0AA591192EDC72 /* Foundation.framework in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | F291D31FA0198052397BCA2C04887411 /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | BC6B1AEB3362EC74323DAD7269AF282D /* Foundation.framework in Frameworks */, 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | /* End PBXFrameworksBuildPhase section */ 97 | 98 | /* Begin PBXGroup section */ 99 | 013B2A2A423D39963EF520BC61A793BE /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 1DE0CE5B1BC7EFA0549A475212F70C04 /* Pods_XProgressRing_Example.framework */, 103 | E1928B4CD097733B3A4CB71F0C688426 /* Pods_XProgressRing_Tests.framework */, 104 | CF2A8FE91B9874373CF2F46AC822C1E8 /* XProgressRing.framework */, 105 | ); 106 | name = Products; 107 | sourceTree = ""; 108 | }; 109 | 065D7D567940D915211A6819E98EA476 /* Pods-XProgressRing_Tests */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 9CFF87D7CD5DC5812838DA15A0B1DEA1 /* Info.plist */, 113 | 94F8D16F619077AF14826B9727E043CB /* Pods-XProgressRing_Tests.modulemap */, 114 | 9125AF13F92D059EB5B03A9350F2AB69 /* Pods-XProgressRing_Tests-acknowledgements.markdown */, 115 | 41E08CA0E67867808E762334A44A236B /* Pods-XProgressRing_Tests-acknowledgements.plist */, 116 | ABE1E91E2AF1A54C2840DFA51D59E397 /* Pods-XProgressRing_Tests-dummy.m */, 117 | 0E9FB8A90FF7D96CDF998606EF3BEE8C /* Pods-XProgressRing_Tests-frameworks.sh */, 118 | 357C994AE97373C865952831E24B9C9F /* Pods-XProgressRing_Tests-resources.sh */, 119 | 655DD82664882C99E27103935459B614 /* Pods-XProgressRing_Tests-umbrella.h */, 120 | 1A9900A31A614DE09277817D15B8F29E /* Pods-XProgressRing_Tests.debug.xcconfig */, 121 | C2EB42016663B5457A99888D40E634CC /* Pods-XProgressRing_Tests.release.xcconfig */, 122 | ); 123 | name = "Pods-XProgressRing_Tests"; 124 | path = "Target Support Files/Pods-XProgressRing_Tests"; 125 | sourceTree = ""; 126 | }; 127 | 06A9FFE896FEBD57E6E8AF4AB5EE9C86 /* XProgressRing */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | BBB44DA3476A9FFCEED4D1D2118B8F6D /* Support Files */, 131 | 288237FB0DA79BEA7CBA7C23A0F76C42 /* XProgressRing */, 132 | ); 133 | name = XProgressRing; 134 | path = ../..; 135 | sourceTree = ""; 136 | }; 137 | 15F12661FC17D3172107388BB943C576 /* Pods-XProgressRing_Example */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 5824F8003332330CFB0A4D1F34D601D2 /* Info.plist */, 141 | 4F74D0CEC94FF40DCDC2215E8ED29DAC /* Pods-XProgressRing_Example.modulemap */, 142 | F9DA430ED1410574FCFC17DEC9C12492 /* Pods-XProgressRing_Example-acknowledgements.markdown */, 143 | B5B98714D7202F773A4F987FE3ED40F0 /* Pods-XProgressRing_Example-acknowledgements.plist */, 144 | 64BC8A0C74088F186B17ED06FDAEFBEA /* Pods-XProgressRing_Example-dummy.m */, 145 | 9ADDF65557DFB45189279A856DD4375F /* Pods-XProgressRing_Example-frameworks.sh */, 146 | 139EAFC64D3C5E65F50ED25F8BFCAD63 /* Pods-XProgressRing_Example-resources.sh */, 147 | 08CD8040A63BEE3BE10C57B864730A2E /* Pods-XProgressRing_Example-umbrella.h */, 148 | 18B73D378D92334DC78F2219F624E395 /* Pods-XProgressRing_Example.debug.xcconfig */, 149 | 689EDACA83119B3787253B81C6BEFA06 /* Pods-XProgressRing_Example.release.xcconfig */, 150 | ); 151 | name = "Pods-XProgressRing_Example"; 152 | path = "Target Support Files/Pods-XProgressRing_Example"; 153 | sourceTree = ""; 154 | }; 155 | 20C68F2E36D8D92763DB65DA670462A3 /* Development Pods */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 06A9FFE896FEBD57E6E8AF4AB5EE9C86 /* XProgressRing */, 159 | ); 160 | name = "Development Pods"; 161 | sourceTree = ""; 162 | }; 163 | 288237FB0DA79BEA7CBA7C23A0F76C42 /* XProgressRing */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | FACA6B533F8AB0094CB4A413EACE55C4 /* Classes */, 167 | ); 168 | path = XProgressRing; 169 | sourceTree = ""; 170 | }; 171 | 3DCAB2B7CDE207B3958B6CB957FCC758 /* iOS */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | CEC22C73C1608DFA5D5D78BDCB218219 /* Foundation.framework */, 175 | ); 176 | name = iOS; 177 | sourceTree = ""; 178 | }; 179 | 7DB346D0F39D3F0E887471402A8071AB = { 180 | isa = PBXGroup; 181 | children = ( 182 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 183 | 20C68F2E36D8D92763DB65DA670462A3 /* Development Pods */, 184 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 185 | 013B2A2A423D39963EF520BC61A793BE /* Products */, 186 | 857CA1A177FBCDAC2D90F813918C24EA /* Targets Support Files */, 187 | ); 188 | sourceTree = ""; 189 | }; 190 | 857CA1A177FBCDAC2D90F813918C24EA /* Targets Support Files */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | 15F12661FC17D3172107388BB943C576 /* Pods-XProgressRing_Example */, 194 | 065D7D567940D915211A6819E98EA476 /* Pods-XProgressRing_Tests */, 195 | ); 196 | name = "Targets Support Files"; 197 | sourceTree = ""; 198 | }; 199 | BBB44DA3476A9FFCEED4D1D2118B8F6D /* Support Files */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | C2853809764DE38353E45BBAB18B4A98 /* Info.plist */, 203 | 8335098FA113C16EE644E4AECF46BACD /* XProgressRing.modulemap */, 204 | 474D2C72335AE6C5B2FE6D2CCDEB5A78 /* XProgressRing.xcconfig */, 205 | 207CA4AB7E67AC216B8575922A8B436C /* XProgressRing-dummy.m */, 206 | 480B582B317C60DAD505A22A9902D0E2 /* XProgressRing-prefix.pch */, 207 | 500C10B40DA4E3C05A215B6CBA56B841 /* XProgressRing-umbrella.h */, 208 | ); 209 | name = "Support Files"; 210 | path = "Example/Pods/Target Support Files/XProgressRing"; 211 | sourceTree = ""; 212 | }; 213 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | 3DCAB2B7CDE207B3958B6CB957FCC758 /* iOS */, 217 | ); 218 | name = Frameworks; 219 | sourceTree = ""; 220 | }; 221 | FACA6B533F8AB0094CB4A413EACE55C4 /* Classes */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | F09742D1E3CA0CC525B455DAFBE89137 /* KDCircularProgress.swift */, 225 | 03A52F04D864D1C5720A91A5A1E77D27 /* ReplaceMe.swift */, 226 | 0519CC0F8F347A8066A6F4407EC45B02 /* XProgressRing.swift */, 227 | ); 228 | path = Classes; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXGroup section */ 232 | 233 | /* Begin PBXHeadersBuildPhase section */ 234 | CACB0B8A6542F17EA9039767613E6D31 /* Headers */ = { 235 | isa = PBXHeadersBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 3C02C51F1694901A308362D4378A0C99 /* Pods-XProgressRing_Example-umbrella.h in Headers */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | E565B55DC88257EA418EA3056FD90704 /* Headers */ = { 243 | isa = PBXHeadersBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | 049D592FCC3A5760FDD0B6426416BC53 /* Pods-XProgressRing_Tests-umbrella.h in Headers */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | EFE0CA5F0763D6A2372716447D288D67 /* Headers */ = { 251 | isa = PBXHeadersBuildPhase; 252 | buildActionMask = 2147483647; 253 | files = ( 254 | 5A70FA857B873D3DF79162A4BA58A5C2 /* XProgressRing-umbrella.h in Headers */, 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | /* End PBXHeadersBuildPhase section */ 259 | 260 | /* Begin PBXNativeTarget section */ 261 | 01B33856CA9A07E9962D83460136099F /* Pods-XProgressRing_Example */ = { 262 | isa = PBXNativeTarget; 263 | buildConfigurationList = 7C69495602BFB888AA89D5F2CFA097C8 /* Build configuration list for PBXNativeTarget "Pods-XProgressRing_Example" */; 264 | buildPhases = ( 265 | 6B4CB04355C43B651C26B8C443B3041B /* Sources */, 266 | 7AF3A8069CD5CD688B1DDFE1589AC828 /* Frameworks */, 267 | CACB0B8A6542F17EA9039767613E6D31 /* Headers */, 268 | ); 269 | buildRules = ( 270 | ); 271 | dependencies = ( 272 | 13C2775EC24E1F09D87FACBAF4AFD959 /* PBXTargetDependency */, 273 | ); 274 | name = "Pods-XProgressRing_Example"; 275 | productName = "Pods-XProgressRing_Example"; 276 | productReference = 1DE0CE5B1BC7EFA0549A475212F70C04 /* Pods_XProgressRing_Example.framework */; 277 | productType = "com.apple.product-type.framework"; 278 | }; 279 | 1FAE700A7A4C913BE4008E492FB1582A /* XProgressRing */ = { 280 | isa = PBXNativeTarget; 281 | buildConfigurationList = 4744863E23BAD078B57D229EBD76A543 /* Build configuration list for PBXNativeTarget "XProgressRing" */; 282 | buildPhases = ( 283 | 19D8EA6013B02A6F75C23A0D8A670D87 /* Sources */, 284 | F291D31FA0198052397BCA2C04887411 /* Frameworks */, 285 | EFE0CA5F0763D6A2372716447D288D67 /* Headers */, 286 | ); 287 | buildRules = ( 288 | ); 289 | dependencies = ( 290 | ); 291 | name = XProgressRing; 292 | productName = XProgressRing; 293 | productReference = CF2A8FE91B9874373CF2F46AC822C1E8 /* XProgressRing.framework */; 294 | productType = "com.apple.product-type.framework"; 295 | }; 296 | F93796DBF4D39B07E1E3E2F2AAA6E759 /* Pods-XProgressRing_Tests */ = { 297 | isa = PBXNativeTarget; 298 | buildConfigurationList = 4A91F7834CC1A15BA13CEDCDF97BF3B0 /* Build configuration list for PBXNativeTarget "Pods-XProgressRing_Tests" */; 299 | buildPhases = ( 300 | E9EFBCDE869B4AECE848342DA0AB747B /* Sources */, 301 | 2503047BBCE57BA3EF8E241436471CF7 /* Frameworks */, 302 | E565B55DC88257EA418EA3056FD90704 /* Headers */, 303 | ); 304 | buildRules = ( 305 | ); 306 | dependencies = ( 307 | ); 308 | name = "Pods-XProgressRing_Tests"; 309 | productName = "Pods-XProgressRing_Tests"; 310 | productReference = E1928B4CD097733B3A4CB71F0C688426 /* Pods_XProgressRing_Tests.framework */; 311 | productType = "com.apple.product-type.framework"; 312 | }; 313 | /* End PBXNativeTarget section */ 314 | 315 | /* Begin PBXProject section */ 316 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 317 | isa = PBXProject; 318 | attributes = { 319 | LastSwiftUpdateCheck = 0730; 320 | LastUpgradeCheck = 0700; 321 | }; 322 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 323 | compatibilityVersion = "Xcode 3.2"; 324 | developmentRegion = English; 325 | hasScannedForEncodings = 0; 326 | knownRegions = ( 327 | en, 328 | ); 329 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 330 | productRefGroup = 013B2A2A423D39963EF520BC61A793BE /* Products */; 331 | projectDirPath = ""; 332 | projectRoot = ""; 333 | targets = ( 334 | 01B33856CA9A07E9962D83460136099F /* Pods-XProgressRing_Example */, 335 | F93796DBF4D39B07E1E3E2F2AAA6E759 /* Pods-XProgressRing_Tests */, 336 | 1FAE700A7A4C913BE4008E492FB1582A /* XProgressRing */, 337 | ); 338 | }; 339 | /* End PBXProject section */ 340 | 341 | /* Begin PBXSourcesBuildPhase section */ 342 | 19D8EA6013B02A6F75C23A0D8A670D87 /* Sources */ = { 343 | isa = PBXSourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | 1E4D2087D96FEB0BB5AD9992EC5C05AE /* KDCircularProgress.swift in Sources */, 347 | 6A683051560E1B277153F62137944774 /* ReplaceMe.swift in Sources */, 348 | 022A1678B1054ED3A1C9E3F9F8A4B6E3 /* XProgressRing-dummy.m in Sources */, 349 | E164A1C8501103570BB90996CE51AFAE /* XProgressRing.swift in Sources */, 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | 6B4CB04355C43B651C26B8C443B3041B /* Sources */ = { 354 | isa = PBXSourcesBuildPhase; 355 | buildActionMask = 2147483647; 356 | files = ( 357 | 5482C35E0608D128E6FC5A71C5AC7418 /* Pods-XProgressRing_Example-dummy.m in Sources */, 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | }; 361 | E9EFBCDE869B4AECE848342DA0AB747B /* Sources */ = { 362 | isa = PBXSourcesBuildPhase; 363 | buildActionMask = 2147483647; 364 | files = ( 365 | A1A2C3FF0E399CA7EB7C06C95A3BACF6 /* Pods-XProgressRing_Tests-dummy.m in Sources */, 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | }; 369 | /* End PBXSourcesBuildPhase section */ 370 | 371 | /* Begin PBXTargetDependency section */ 372 | 13C2775EC24E1F09D87FACBAF4AFD959 /* PBXTargetDependency */ = { 373 | isa = PBXTargetDependency; 374 | name = XProgressRing; 375 | target = 1FAE700A7A4C913BE4008E492FB1582A /* XProgressRing */; 376 | targetProxy = 9761CBEB929BDCFB403B245AA25A25A8 /* PBXContainerItemProxy */; 377 | }; 378 | /* End PBXTargetDependency section */ 379 | 380 | /* Begin XCBuildConfiguration section */ 381 | 0ACDCBCB0B6796575F46FFA2F5410C6B /* Release */ = { 382 | isa = XCBuildConfiguration; 383 | buildSettings = { 384 | ALWAYS_SEARCH_USER_PATHS = NO; 385 | CLANG_ANALYZER_NONNULL = YES; 386 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 387 | CLANG_CXX_LIBRARY = "libc++"; 388 | CLANG_ENABLE_MODULES = YES; 389 | CLANG_ENABLE_OBJC_ARC = YES; 390 | CLANG_WARN_BOOL_CONVERSION = YES; 391 | CLANG_WARN_CONSTANT_CONVERSION = YES; 392 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 393 | CLANG_WARN_EMPTY_BODY = YES; 394 | CLANG_WARN_ENUM_CONVERSION = YES; 395 | CLANG_WARN_INT_CONVERSION = YES; 396 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 397 | CLANG_WARN_UNREACHABLE_CODE = YES; 398 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 399 | COPY_PHASE_STRIP = YES; 400 | ENABLE_NS_ASSERTIONS = NO; 401 | GCC_C_LANGUAGE_STANDARD = gnu99; 402 | GCC_PREPROCESSOR_DEFINITIONS = ( 403 | "POD_CONFIGURATION_RELEASE=1", 404 | "$(inherited)", 405 | ); 406 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 407 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 408 | GCC_WARN_UNDECLARED_SELECTOR = YES; 409 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 410 | GCC_WARN_UNUSED_FUNCTION = YES; 411 | GCC_WARN_UNUSED_VARIABLE = YES; 412 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 413 | STRIP_INSTALLED_PRODUCT = NO; 414 | SYMROOT = "${SRCROOT}/../build"; 415 | VALIDATE_PRODUCT = YES; 416 | }; 417 | name = Release; 418 | }; 419 | 3DC3AA3EE821677F36CAE7AA5D6622BC /* Release */ = { 420 | isa = XCBuildConfiguration; 421 | baseConfigurationReference = 474D2C72335AE6C5B2FE6D2CCDEB5A78 /* XProgressRing.xcconfig */; 422 | buildSettings = { 423 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 424 | CURRENT_PROJECT_VERSION = 1; 425 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 426 | DEFINES_MODULE = YES; 427 | DYLIB_COMPATIBILITY_VERSION = 1; 428 | DYLIB_CURRENT_VERSION = 1; 429 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 430 | ENABLE_STRICT_OBJC_MSGSEND = YES; 431 | GCC_NO_COMMON_BLOCKS = YES; 432 | GCC_PREFIX_HEADER = "Target Support Files/XProgressRing/XProgressRing-prefix.pch"; 433 | INFOPLIST_FILE = "Target Support Files/XProgressRing/Info.plist"; 434 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 435 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 437 | MODULEMAP_FILE = "Target Support Files/XProgressRing/XProgressRing.modulemap"; 438 | MTL_ENABLE_DEBUG_INFO = NO; 439 | PRODUCT_NAME = XProgressRing; 440 | SDKROOT = iphoneos; 441 | SKIP_INSTALL = YES; 442 | SWIFT_VERSION = 3.0; 443 | TARGETED_DEVICE_FAMILY = "1,2"; 444 | VERSIONING_SYSTEM = "apple-generic"; 445 | VERSION_INFO_PREFIX = ""; 446 | }; 447 | name = Release; 448 | }; 449 | 7BE7FA996C6DE15DD02C9A7E91C74E89 /* Debug */ = { 450 | isa = XCBuildConfiguration; 451 | baseConfigurationReference = 1A9900A31A614DE09277817D15B8F29E /* Pods-XProgressRing_Tests.debug.xcconfig */; 452 | buildSettings = { 453 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 454 | CURRENT_PROJECT_VERSION = 1; 455 | DEBUG_INFORMATION_FORMAT = dwarf; 456 | DEFINES_MODULE = YES; 457 | DYLIB_COMPATIBILITY_VERSION = 1; 458 | DYLIB_CURRENT_VERSION = 1; 459 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 460 | ENABLE_STRICT_OBJC_MSGSEND = YES; 461 | GCC_NO_COMMON_BLOCKS = YES; 462 | INFOPLIST_FILE = "Target Support Files/Pods-XProgressRing_Tests/Info.plist"; 463 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 464 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 465 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 466 | MACH_O_TYPE = staticlib; 467 | MODULEMAP_FILE = "Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests.modulemap"; 468 | MTL_ENABLE_DEBUG_INFO = YES; 469 | OTHER_LDFLAGS = ""; 470 | OTHER_LIBTOOLFLAGS = ""; 471 | PODS_ROOT = "$(SRCROOT)"; 472 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 473 | PRODUCT_NAME = Pods_XProgressRing_Tests; 474 | SDKROOT = iphoneos; 475 | SKIP_INSTALL = YES; 476 | SWIFT_VERSION = 3.0; 477 | TARGETED_DEVICE_FAMILY = "1,2"; 478 | VERSIONING_SYSTEM = "apple-generic"; 479 | VERSION_INFO_PREFIX = ""; 480 | }; 481 | name = Debug; 482 | }; 483 | 945F662644EE9FC6A87CB615CFA8BFC1 /* Release */ = { 484 | isa = XCBuildConfiguration; 485 | baseConfigurationReference = C2EB42016663B5457A99888D40E634CC /* Pods-XProgressRing_Tests.release.xcconfig */; 486 | buildSettings = { 487 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 488 | CURRENT_PROJECT_VERSION = 1; 489 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 490 | DEFINES_MODULE = YES; 491 | DYLIB_COMPATIBILITY_VERSION = 1; 492 | DYLIB_CURRENT_VERSION = 1; 493 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 494 | ENABLE_STRICT_OBJC_MSGSEND = YES; 495 | GCC_NO_COMMON_BLOCKS = YES; 496 | INFOPLIST_FILE = "Target Support Files/Pods-XProgressRing_Tests/Info.plist"; 497 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 498 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 499 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 500 | MACH_O_TYPE = staticlib; 501 | MODULEMAP_FILE = "Target Support Files/Pods-XProgressRing_Tests/Pods-XProgressRing_Tests.modulemap"; 502 | MTL_ENABLE_DEBUG_INFO = NO; 503 | OTHER_LDFLAGS = ""; 504 | OTHER_LIBTOOLFLAGS = ""; 505 | PODS_ROOT = "$(SRCROOT)"; 506 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 507 | PRODUCT_NAME = Pods_XProgressRing_Tests; 508 | SDKROOT = iphoneos; 509 | SKIP_INSTALL = YES; 510 | SWIFT_VERSION = 3.0; 511 | TARGETED_DEVICE_FAMILY = "1,2"; 512 | VERSIONING_SYSTEM = "apple-generic"; 513 | VERSION_INFO_PREFIX = ""; 514 | }; 515 | name = Release; 516 | }; 517 | A3D5FE6E3B2B82E29753E21C4B065E10 /* Release */ = { 518 | isa = XCBuildConfiguration; 519 | baseConfigurationReference = 689EDACA83119B3787253B81C6BEFA06 /* Pods-XProgressRing_Example.release.xcconfig */; 520 | buildSettings = { 521 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 522 | CURRENT_PROJECT_VERSION = 1; 523 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 524 | DEFINES_MODULE = YES; 525 | DYLIB_COMPATIBILITY_VERSION = 1; 526 | DYLIB_CURRENT_VERSION = 1; 527 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 528 | ENABLE_STRICT_OBJC_MSGSEND = YES; 529 | GCC_NO_COMMON_BLOCKS = YES; 530 | INFOPLIST_FILE = "Target Support Files/Pods-XProgressRing_Example/Info.plist"; 531 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 532 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 533 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 534 | MACH_O_TYPE = staticlib; 535 | MODULEMAP_FILE = "Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example.modulemap"; 536 | MTL_ENABLE_DEBUG_INFO = NO; 537 | OTHER_LDFLAGS = ""; 538 | OTHER_LIBTOOLFLAGS = ""; 539 | PODS_ROOT = "$(SRCROOT)"; 540 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 541 | PRODUCT_NAME = Pods_XProgressRing_Example; 542 | SDKROOT = iphoneos; 543 | SKIP_INSTALL = YES; 544 | SWIFT_VERSION = 3.0; 545 | TARGETED_DEVICE_FAMILY = "1,2"; 546 | VERSIONING_SYSTEM = "apple-generic"; 547 | VERSION_INFO_PREFIX = ""; 548 | }; 549 | name = Release; 550 | }; 551 | B398D1533A6BBE384421ADF9BCA1D45B /* Debug */ = { 552 | isa = XCBuildConfiguration; 553 | baseConfigurationReference = 474D2C72335AE6C5B2FE6D2CCDEB5A78 /* XProgressRing.xcconfig */; 554 | buildSettings = { 555 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 556 | CURRENT_PROJECT_VERSION = 1; 557 | DEBUG_INFORMATION_FORMAT = dwarf; 558 | DEFINES_MODULE = YES; 559 | DYLIB_COMPATIBILITY_VERSION = 1; 560 | DYLIB_CURRENT_VERSION = 1; 561 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 562 | ENABLE_STRICT_OBJC_MSGSEND = YES; 563 | GCC_NO_COMMON_BLOCKS = YES; 564 | GCC_PREFIX_HEADER = "Target Support Files/XProgressRing/XProgressRing-prefix.pch"; 565 | INFOPLIST_FILE = "Target Support Files/XProgressRing/Info.plist"; 566 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 567 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 568 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 569 | MODULEMAP_FILE = "Target Support Files/XProgressRing/XProgressRing.modulemap"; 570 | MTL_ENABLE_DEBUG_INFO = YES; 571 | PRODUCT_NAME = XProgressRing; 572 | SDKROOT = iphoneos; 573 | SKIP_INSTALL = YES; 574 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 575 | SWIFT_VERSION = 3.0; 576 | TARGETED_DEVICE_FAMILY = "1,2"; 577 | VERSIONING_SYSTEM = "apple-generic"; 578 | VERSION_INFO_PREFIX = ""; 579 | }; 580 | name = Debug; 581 | }; 582 | CD468EFFAEE6E7F3D0A6C6616BBE590C /* Debug */ = { 583 | isa = XCBuildConfiguration; 584 | baseConfigurationReference = 18B73D378D92334DC78F2219F624E395 /* Pods-XProgressRing_Example.debug.xcconfig */; 585 | buildSettings = { 586 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 587 | CURRENT_PROJECT_VERSION = 1; 588 | DEBUG_INFORMATION_FORMAT = dwarf; 589 | DEFINES_MODULE = YES; 590 | DYLIB_COMPATIBILITY_VERSION = 1; 591 | DYLIB_CURRENT_VERSION = 1; 592 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 593 | ENABLE_STRICT_OBJC_MSGSEND = YES; 594 | GCC_NO_COMMON_BLOCKS = YES; 595 | INFOPLIST_FILE = "Target Support Files/Pods-XProgressRing_Example/Info.plist"; 596 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 597 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 598 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 599 | MACH_O_TYPE = staticlib; 600 | MODULEMAP_FILE = "Target Support Files/Pods-XProgressRing_Example/Pods-XProgressRing_Example.modulemap"; 601 | MTL_ENABLE_DEBUG_INFO = YES; 602 | OTHER_LDFLAGS = ""; 603 | OTHER_LIBTOOLFLAGS = ""; 604 | PODS_ROOT = "$(SRCROOT)"; 605 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 606 | PRODUCT_NAME = Pods_XProgressRing_Example; 607 | SDKROOT = iphoneos; 608 | SKIP_INSTALL = YES; 609 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 610 | SWIFT_VERSION = 3.0; 611 | TARGETED_DEVICE_FAMILY = "1,2"; 612 | VERSIONING_SYSTEM = "apple-generic"; 613 | VERSION_INFO_PREFIX = ""; 614 | }; 615 | name = Debug; 616 | }; 617 | D3E3D092A3FF7311A98E44BBA36FFD12 /* Debug */ = { 618 | isa = XCBuildConfiguration; 619 | buildSettings = { 620 | ALWAYS_SEARCH_USER_PATHS = NO; 621 | CLANG_ANALYZER_NONNULL = YES; 622 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 623 | CLANG_CXX_LIBRARY = "libc++"; 624 | CLANG_ENABLE_MODULES = YES; 625 | CLANG_ENABLE_OBJC_ARC = YES; 626 | CLANG_WARN_BOOL_CONVERSION = YES; 627 | CLANG_WARN_CONSTANT_CONVERSION = YES; 628 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 629 | CLANG_WARN_EMPTY_BODY = YES; 630 | CLANG_WARN_ENUM_CONVERSION = YES; 631 | CLANG_WARN_INT_CONVERSION = YES; 632 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 633 | CLANG_WARN_UNREACHABLE_CODE = YES; 634 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 635 | COPY_PHASE_STRIP = NO; 636 | ENABLE_TESTABILITY = YES; 637 | GCC_C_LANGUAGE_STANDARD = gnu99; 638 | GCC_DYNAMIC_NO_PIC = NO; 639 | GCC_OPTIMIZATION_LEVEL = 0; 640 | GCC_PREPROCESSOR_DEFINITIONS = ( 641 | "POD_CONFIGURATION_DEBUG=1", 642 | "DEBUG=1", 643 | "$(inherited)", 644 | ); 645 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 646 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 647 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 648 | GCC_WARN_UNDECLARED_SELECTOR = YES; 649 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 650 | GCC_WARN_UNUSED_FUNCTION = YES; 651 | GCC_WARN_UNUSED_VARIABLE = YES; 652 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 653 | ONLY_ACTIVE_ARCH = YES; 654 | STRIP_INSTALLED_PRODUCT = NO; 655 | SYMROOT = "${SRCROOT}/../build"; 656 | }; 657 | name = Debug; 658 | }; 659 | /* End XCBuildConfiguration section */ 660 | 661 | /* Begin XCConfigurationList section */ 662 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 663 | isa = XCConfigurationList; 664 | buildConfigurations = ( 665 | D3E3D092A3FF7311A98E44BBA36FFD12 /* Debug */, 666 | 0ACDCBCB0B6796575F46FFA2F5410C6B /* Release */, 667 | ); 668 | defaultConfigurationIsVisible = 0; 669 | defaultConfigurationName = Release; 670 | }; 671 | 4744863E23BAD078B57D229EBD76A543 /* Build configuration list for PBXNativeTarget "XProgressRing" */ = { 672 | isa = XCConfigurationList; 673 | buildConfigurations = ( 674 | B398D1533A6BBE384421ADF9BCA1D45B /* Debug */, 675 | 3DC3AA3EE821677F36CAE7AA5D6622BC /* Release */, 676 | ); 677 | defaultConfigurationIsVisible = 0; 678 | defaultConfigurationName = Release; 679 | }; 680 | 4A91F7834CC1A15BA13CEDCDF97BF3B0 /* Build configuration list for PBXNativeTarget "Pods-XProgressRing_Tests" */ = { 681 | isa = XCConfigurationList; 682 | buildConfigurations = ( 683 | 7BE7FA996C6DE15DD02C9A7E91C74E89 /* Debug */, 684 | 945F662644EE9FC6A87CB615CFA8BFC1 /* Release */, 685 | ); 686 | defaultConfigurationIsVisible = 0; 687 | defaultConfigurationName = Release; 688 | }; 689 | 7C69495602BFB888AA89D5F2CFA097C8 /* Build configuration list for PBXNativeTarget "Pods-XProgressRing_Example" */ = { 690 | isa = XCConfigurationList; 691 | buildConfigurations = ( 692 | CD468EFFAEE6E7F3D0A6C6616BBE590C /* Debug */, 693 | A3D5FE6E3B2B82E29753E21C4B065E10 /* Release */, 694 | ); 695 | defaultConfigurationIsVisible = 0; 696 | defaultConfigurationName = Release; 697 | }; 698 | /* End XCConfigurationList section */ 699 | }; 700 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 701 | } 702 | --------------------------------------------------------------------------------