Initial Commit

This commit is contained in:
Jalal Ouraigua
2018-12-08 06:36:03 +00:00
commit b1e0e3dca1
75 changed files with 6385 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
{
"SWIFT": {
"TOO_MANY_IVARS": [8, 12, 16, 20],
"TOO_MANY_FUNCTIONS": [46, 55, 65, 85],
"ARITY" : [5, 6, 7, 8],
"ABC": [15, 25, 50, 70],
"TOTAL_COMPLEXITY": [100, 180, 280, 400],
"TOTAL_LOC": [200, 250, 320, 450]
}
}
+37
View File
@@ -0,0 +1,37 @@
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
*.xccheckout
profile
*.moved-aside
DerivedData
*.hmap
*.ipa
# Bundler
.bundle
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Note: if you ignore the Pods directory, make sure to uncomment
# `pod install` in .travis.yml
#
# Pods/
+1
View File
@@ -0,0 +1 @@
jazzy --podspec JOCircularSlider.podspec
+1
View File
@@ -0,0 +1 @@
4.2
+14
View File
@@ -0,0 +1,14 @@
# references:
# * https://www.objc.io/issues/6-build-tools/travis-ci/
# * https://github.com/supermarin/xcpretty#usage
osx_image: xcode7.3
language: objective-c
# cache: cocoapods
# podfile: Example/Podfile
# before_install:
# - gem install cocoapods # Since Travis is not always on latest version
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/JOCircularSlider.xcworkspace -scheme JOCircularSlider-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
Executable
+11
View File
@@ -0,0 +1,11 @@
# Change Log
All notable changes to this project will be documented in this file.
## [1.0.3](https://github.com/ouraigua/JOCircularSlider/releases/tag/1.0.3)
* Add example
## [1.0.0](https://github.com/ouraigua/JOCircularSlider/releases/tag/1.0.0)
* Initial release.
@@ -0,0 +1,600 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
17C382591B47967C59509AD9 /* Pods_JOCircularSlider_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F52466A1B3C5C5DC1D491FD /* Pods_JOCircularSlider_Tests.framework */; };
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; };
607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; };
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
9A9536F8A95805979063DD22 /* Pods_JOCircularSlider_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CC0EF1308BF44BE0466D9BF /* Pods_JOCircularSlider_Example.framework */; };
AF4F276921BB942500D39C60 /* .jazzy_cmd.yaml in Resources */ = {isa = PBXBuildFile; fileRef = AF4F276821BB942500D39C60 /* .jazzy_cmd.yaml */; };
AF737E2421B89B2B00BFBE5E /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF737E2321B89B2B00BFBE5E /* GradientView.swift */; };
AF737E2621B89F8000BFBE5E /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF737E2521B89F8000BFBE5E /* Utils.swift */; };
AF737E2921B8D60400BFBE5E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AF737E2721B8D60400BFBE5E /* LaunchScreen.storyboard */; };
AF737E2B21B8D71900BFBE5E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = AF737E2A21B8D71900BFBE5E /* Assets.xcassets */; };
AFB6605421BB1F2000E22629 /* .codebeatsettings in Resources */ = {isa = PBXBuildFile; fileRef = AFB6605321BB1F2000E22629 /* .codebeatsettings */; };
AFB6605821BB1F3300E22629 /* .swift-version in Resources */ = {isa = PBXBuildFile; fileRef = AFB6605521BB1F3300E22629 /* .swift-version */; };
AFB6605921BB1F3300E22629 /* .travis.yml in Resources */ = {isa = PBXBuildFile; fileRef = AFB6605621BB1F3300E22629 /* .travis.yml */; };
AFB6605A21BB1F3300E22629 /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = AFB6605721BB1F3300E22629 /* .gitignore */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 607FACC81AFB9204008FA782 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 607FACCF1AFB9204008FA782;
remoteInfo = JOCircularSlider;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
3CC0EF1308BF44BE0466D9BF /* Pods_JOCircularSlider_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JOCircularSlider_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
607FACD01AFB9204008FA782 /* JOCircularSlider_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JOCircularSlider_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
607FACE51AFB9204008FA782 /* JOCircularSlider_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JOCircularSlider_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
7B49D36A49F9D30C4E298C6D /* JOCircularSlider.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = JOCircularSlider.podspec; path = ../JOCircularSlider.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
7F52466A1B3C5C5DC1D491FD /* Pods_JOCircularSlider_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JOCircularSlider_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
857FCA310632359F6C66CC65 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
9ED6373888E3CDF94E3F8213 /* Pods-JOCircularSlider_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JOCircularSlider_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JOCircularSlider_Tests/Pods-JOCircularSlider_Tests.debug.xcconfig"; sourceTree = "<group>"; };
A310FF740AC505A50DEF761C /* Pods-JOCircularSlider_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JOCircularSlider_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-JOCircularSlider_Tests/Pods-JOCircularSlider_Tests.release.xcconfig"; sourceTree = "<group>"; };
AF4F276821BB942500D39C60 /* .jazzy_cmd.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = .jazzy_cmd.yaml; path = ../.jazzy_cmd.yaml; sourceTree = "<group>"; };
AF737E2321B89B2B00BFBE5E /* GradientView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = "<group>"; };
AF737E2521B89F8000BFBE5E /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
AF737E2821B8D60400BFBE5E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
AF737E2A21B8D71900BFBE5E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
AFB6605321BB1F2000E22629 /* .codebeatsettings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = .codebeatsettings; path = ../.codebeatsettings; sourceTree = "<group>"; };
AFB6605521BB1F3300E22629 /* .swift-version */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ".swift-version"; path = "../.swift-version"; sourceTree = "<group>"; };
AFB6605621BB1F3300E22629 /* .travis.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = .travis.yml; path = ../.travis.yml; sourceTree = "<group>"; };
AFB6605721BB1F3300E22629 /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = .gitignore; path = ../.gitignore; sourceTree = "<group>"; };
B53C2541DC14B9F694325C57 /* Pods-JOCircularSlider_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JOCircularSlider_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-JOCircularSlider_Example/Pods-JOCircularSlider_Example.debug.xcconfig"; sourceTree = "<group>"; };
D0CC336CBAD390916FD5F8FE /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
D1B349DAD0AE068D7095DAFC /* Pods-JOCircularSlider_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JOCircularSlider_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-JOCircularSlider_Example/Pods-JOCircularSlider_Example.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
607FACCD1AFB9204008FA782 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9A9536F8A95805979063DD22 /* Pods_JOCircularSlider_Example.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE21AFB9204008FA782 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
17C382591B47967C59509AD9 /* Pods_JOCircularSlider_Tests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
1A954A0BD054FB494CFC4610 /* Pods */ = {
isa = PBXGroup;
children = (
B53C2541DC14B9F694325C57 /* Pods-JOCircularSlider_Example.debug.xcconfig */,
D1B349DAD0AE068D7095DAFC /* Pods-JOCircularSlider_Example.release.xcconfig */,
9ED6373888E3CDF94E3F8213 /* Pods-JOCircularSlider_Tests.debug.xcconfig */,
A310FF740AC505A50DEF761C /* Pods-JOCircularSlider_Tests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
1CA3AAEC0ADB94CA0FDE2184 /* Frameworks */ = {
isa = PBXGroup;
children = (
3CC0EF1308BF44BE0466D9BF /* Pods_JOCircularSlider_Example.framework */,
7F52466A1B3C5C5DC1D491FD /* Pods_JOCircularSlider_Tests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
607FACC71AFB9204008FA782 = {
isa = PBXGroup;
children = (
607FACF51AFB993E008FA782 /* Podspec Metadata */,
607FACD21AFB9204008FA782 /* Example for JOCircularSlider */,
607FACE81AFB9204008FA782 /* Tests */,
607FACD11AFB9204008FA782 /* Products */,
1A954A0BD054FB494CFC4610 /* Pods */,
1CA3AAEC0ADB94CA0FDE2184 /* Frameworks */,
);
sourceTree = "<group>";
};
607FACD11AFB9204008FA782 /* Products */ = {
isa = PBXGroup;
children = (
607FACD01AFB9204008FA782 /* JOCircularSlider_Example.app */,
607FACE51AFB9204008FA782 /* JOCircularSlider_Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
607FACD21AFB9204008FA782 /* Example for JOCircularSlider */ = {
isa = PBXGroup;
children = (
607FACD51AFB9204008FA782 /* AppDelegate.swift */,
607FACD71AFB9204008FA782 /* ViewController.swift */,
AF737E2321B89B2B00BFBE5E /* GradientView.swift */,
AF737E2521B89F8000BFBE5E /* Utils.swift */,
AF737E2A21B8D71900BFBE5E /* Assets.xcassets */,
607FACD91AFB9204008FA782 /* Main.storyboard */,
AF737E2721B8D60400BFBE5E /* LaunchScreen.storyboard */,
607FACD31AFB9204008FA782 /* Supporting Files */,
);
name = "Example for JOCircularSlider";
path = JOCircularSlider;
sourceTree = "<group>";
};
607FACD31AFB9204008FA782 /* Supporting Files */ = {
isa = PBXGroup;
children = (
607FACD41AFB9204008FA782 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
607FACE81AFB9204008FA782 /* Tests */ = {
isa = PBXGroup;
children = (
607FACEB1AFB9204008FA782 /* Tests.swift */,
607FACE91AFB9204008FA782 /* Supporting Files */,
);
path = Tests;
sourceTree = "<group>";
};
607FACE91AFB9204008FA782 /* Supporting Files */ = {
isa = PBXGroup;
children = (
607FACEA1AFB9204008FA782 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
607FACF51AFB993E008FA782 /* Podspec Metadata */ = {
isa = PBXGroup;
children = (
7B49D36A49F9D30C4E298C6D /* JOCircularSlider.podspec */,
857FCA310632359F6C66CC65 /* README.md */,
D0CC336CBAD390916FD5F8FE /* LICENSE */,
AFB6605321BB1F2000E22629 /* .codebeatsettings */,
AFB6605721BB1F3300E22629 /* .gitignore */,
AFB6605521BB1F3300E22629 /* .swift-version */,
AFB6605621BB1F3300E22629 /* .travis.yml */,
AF4F276821BB942500D39C60 /* .jazzy_cmd.yaml */,
);
name = "Podspec Metadata";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
607FACCF1AFB9204008FA782 /* JOCircularSlider_Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "JOCircularSlider_Example" */;
buildPhases = (
976ADAA40D81B4468508F351 /* [CP] Check Pods Manifest.lock */,
607FACCC1AFB9204008FA782 /* Sources */,
607FACCD1AFB9204008FA782 /* Frameworks */,
607FACCE1AFB9204008FA782 /* Resources */,
B78D5F1F9DF5DF76B5C5B133 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = JOCircularSlider_Example;
productName = JOCircularSlider;
productReference = 607FACD01AFB9204008FA782 /* JOCircularSlider_Example.app */;
productType = "com.apple.product-type.application";
};
607FACE41AFB9204008FA782 /* JOCircularSlider_Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "JOCircularSlider_Tests" */;
buildPhases = (
FA1C097A5F70A5BB3E1747B8 /* [CP] Check Pods Manifest.lock */,
607FACE11AFB9204008FA782 /* Sources */,
607FACE21AFB9204008FA782 /* Frameworks */,
607FACE31AFB9204008FA782 /* Resources */,
);
buildRules = (
);
dependencies = (
607FACE71AFB9204008FA782 /* PBXTargetDependency */,
);
name = JOCircularSlider_Tests;
productName = Tests;
productReference = 607FACE51AFB9204008FA782 /* JOCircularSlider_Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
607FACC81AFB9204008FA782 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = CocoaPods;
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = 28UW7GL832;
LastSwiftMigration = 1000;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = 28UW7GL832;
LastSwiftMigration = 1000;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
};
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "JOCircularSlider" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 607FACC71AFB9204008FA782;
productRefGroup = 607FACD11AFB9204008FA782 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
607FACCF1AFB9204008FA782 /* JOCircularSlider_Example */,
607FACE41AFB9204008FA782 /* JOCircularSlider_Tests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
607FACCE1AFB9204008FA782 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
AFB6605921BB1F3300E22629 /* .travis.yml in Resources */,
AFB6605A21BB1F3300E22629 /* .gitignore in Resources */,
AF737E2921B8D60400BFBE5E /* LaunchScreen.storyboard in Resources */,
AF737E2B21B8D71900BFBE5E /* Assets.xcassets in Resources */,
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */,
AF4F276921BB942500D39C60 /* .jazzy_cmd.yaml in Resources */,
AFB6605421BB1F2000E22629 /* .codebeatsettings in Resources */,
AFB6605821BB1F3300E22629 /* .swift-version in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE31AFB9204008FA782 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
976ADAA40D81B4468508F351 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-JOCircularSlider_Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
B78D5F1F9DF5DF76B5C5B133 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-JOCircularSlider_Example/Pods-JOCircularSlider_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/JOCircularSlider/JOCircularSlider.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JOCircularSlider.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-JOCircularSlider_Example/Pods-JOCircularSlider_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
FA1C097A5F70A5BB3E1747B8 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-JOCircularSlider_Tests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
607FACCC1AFB9204008FA782 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
607FACD81AFB9204008FA782 /* ViewController.swift in Sources */,
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */,
AF737E2421B89B2B00BFBE5E /* GradientView.swift in Sources */,
AF737E2621B89F8000BFBE5E /* Utils.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
607FACE11AFB9204008FA782 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
607FACE71AFB9204008FA782 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 607FACCF1AFB9204008FA782 /* JOCircularSlider_Example */;
targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
607FACD91AFB9204008FA782 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
607FACDA1AFB9204008FA782 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
AF737E2721B8D60400BFBE5E /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
AF737E2821B8D60400BFBE5E /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
607FACED1AFB9204008FA782 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
607FACEE1AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
607FACF01AFB9204008FA782 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B53C2541DC14B9F694325C57 /* Pods-JOCircularSlider_Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 28UW7GL832;
INFOPLIST_FILE = JOCircularSlider/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "com.ouraigua.JOCircularSlider-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
607FACF11AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = D1B349DAD0AE068D7095DAFC /* Pods-JOCircularSlider_Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 28UW7GL832;
INFOPLIST_FILE = JOCircularSlider/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "com.ouraigua.JOCircularSlider-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
607FACF31AFB9204008FA782 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9ED6373888E3CDF94E3F8213 /* Pods-JOCircularSlider_Tests.debug.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = 28UW7GL832;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/Frameworks @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JOCircularSlider_Example.app/JOCircularSlider_Example";
};
name = Debug;
};
607FACF41AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A310FF740AC505A50DEF761C /* Pods-JOCircularSlider_Tests.release.xcconfig */;
buildSettings = {
DEVELOPMENT_TEAM = 28UW7GL832;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/Frameworks @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/JOCircularSlider_Example.app/JOCircularSlider_Example";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "JOCircularSlider" */ = {
isa = XCConfigurationList;
buildConfigurations = (
607FACED1AFB9204008FA782 /* Debug */,
607FACEE1AFB9204008FA782 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "JOCircularSlider_Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
607FACF01AFB9204008FA782 /* Debug */,
607FACF11AFB9204008FA782 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "JOCircularSlider_Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
607FACF31AFB9204008FA782 /* Debug */,
607FACF41AFB9204008FA782 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 607FACC81AFB9204008FA782 /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:JOCircularSlider.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "JOCircularSlider_Example.app"
BlueprintName = "JOCircularSlider_Example"
ReferencedContainer = "container:JOCircularSlider.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACE41AFB9204008FA782"
BuildableName = "JOCircularSlider_Tests.xctest"
BlueprintName = "JOCircularSlider_Tests"
ReferencedContainer = "container:JOCircularSlider.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACE41AFB9204008FA782"
BuildableName = "JOCircularSlider_Tests.xctest"
BlueprintName = "JOCircularSlider_Tests"
ReferencedContainer = "container:JOCircularSlider.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "JOCircularSlider_Example.app"
BlueprintName = "JOCircularSlider_Example"
ReferencedContainer = "container:JOCircularSlider.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "JOCircularSlider_Example.app"
BlueprintName = "JOCircularSlider_Example"
ReferencedContainer = "container:JOCircularSlider.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "JOCircularSlider_Example.app"
BlueprintName = "JOCircularSlider_Example"
ReferencedContainer = "container:JOCircularSlider.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:JOCircularSlider.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,46 @@
//
// AppDelegate.swift
// JOCircularSlider
//
// Created by Jalal Ouraigua on 12/05/2018.
// Copyright (c) 2018 Jalal Ouraigua. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(_ application: UIApplication) {
// 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.
// 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.
}
func applicationDidEnterBackground(_ application: UIApplication) {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
func applicationWillEnterForeground(_ application: UIApplication) {
// 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.
}
func applicationDidBecomeActive(_ application: UIApplication) {
// 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.
}
func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,15 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "thumb.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="kyC-50-ACg">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="QKt-mf-1VZ">
<objects>
<viewController id="kyC-50-ACg" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="txe-SZ-eyi">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="esi-0o-8Hw"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="U0S-aT-UUb" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-346" y="-28"/>
</scene>
</scenes>
</document>
@@ -0,0 +1,221 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="T5Y-X3-uD8">
<device id="retina6_1" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="xFE-dW-ZTb">
<objects>
<viewController id="T5Y-X3-uD8" customClass="ViewController" customModule="JOCircularSlider_Example" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Edf-eP-nqt" customClass="GradientView" customModule="JOCircularSlider_Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P5P-LX-iZM">
<rect key="frame" x="20" y="64" width="374" height="476"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fah-tE-CsW" customClass="CircularSlider" customModule="JOCircularSlider">
<rect key="frame" x="18.5" y="69.5" width="337" height="337"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" secondItem="fah-tE-CsW" secondAttribute="height" multiplier="1:1" id="v7c-ZT-Cf5"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="isClockwise" value="NO"/>
<userDefinedRuntimeAttribute type="number" keyPath="endAngle">
<real key="value" value="310"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="startAngle">
<real key="value" value="230"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="color3">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="color2">
<color key="value" red="0.15235996039999999" green="0.17974209029999999" blue="0.22156283139999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="color1">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="color4">
<color key="value" red="0.13288810049999999" green="0.14611955109999999" blue="0.1740877602" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="maxidotOffColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="minidotColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="maxidotOnColor">
<color key="value" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="highlightColor">
<color key="value" red="0.33810979099999999" green="0.36411823659999998" blue="0.42480460930000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="textColor">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="pointerSizeMultiplier">
<real key="value" value="0.14999999999999999"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="minidotViewIsHidden" value="NO"/>
<userDefinedRuntimeAttribute type="number" keyPath="knobShadowOpacity">
<real key="value" value="0.80000000000000004"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="pointerColor2">
<color key="value" red="0.2530443235" green="0.27250927159999999" blue="0.31792748339999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="pointerColor1">
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="fah-tE-CsW" firstAttribute="centerY" secondItem="P5P-LX-iZM" secondAttribute="centerY" id="A21-Rk-r56"/>
<constraint firstItem="fah-tE-CsW" firstAttribute="centerX" secondItem="P5P-LX-iZM" secondAttribute="centerX" id="fPN-4L-4sw"/>
<constraint firstItem="fah-tE-CsW" firstAttribute="width" secondItem="P5P-LX-iZM" secondAttribute="width" multiplier="0.9" id="wXF-02-uHg"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="6nV-kU-kJg">
<rect key="frame" x="41.5" y="565" width="331" height="257"/>
<subviews>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.86000001430511475" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="Yng-5x-Nhy" customClass="DesignableSlider" customModule="JOCircularSlider_Example" customModuleProvider="target">
<rect key="frame" x="-2" y="0.0" width="335" height="16"/>
<color key="tintColor" red="0.20392156859999999" green="0.23529411759999999" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="maximumTrackTintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="thumbTintColor" red="0.2530443235" green="0.27250927159999999" blue="0.31792748339999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="image" keyPath="thumbImage" value="thumb"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="changeRadius:" destination="T5Y-X3-uD8" eventType="valueChanged" id="SLY-b5-FoX"/>
</connections>
</slider>
<slider opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.69999998807907104" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="HRQ-Xq-Tde" customClass="DesignableSlider" customModule="JOCircularSlider_Example" customModuleProvider="target">
<rect key="frame" x="-2" y="29" width="335" height="16"/>
<color key="tintColor" red="0.20392156859999999" green="0.23529411759999999" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="maximumTrackTintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="thumbTintColor" red="0.2530443235" green="0.27250927159999999" blue="0.31792748339999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="image" keyPath="thumbImage" value="thumb"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="changeRadius:" destination="T5Y-X3-uD8" eventType="valueChanged" id="6a3-yR-tSc"/>
</connections>
</slider>
<slider opaque="NO" tag="2" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.54000002145767212" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="LTv-bA-2b0" customClass="DesignableSlider" customModule="JOCircularSlider_Example" customModuleProvider="target">
<rect key="frame" x="-2" y="58" width="335" height="16"/>
<color key="tintColor" red="0.20392156859999999" green="0.23529411759999999" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="maximumTrackTintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="thumbTintColor" red="0.2530443235" green="0.27250927159999999" blue="0.31792748339999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="image" keyPath="thumbImage" value="thumb"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="changeRadius:" destination="T5Y-X3-uD8" eventType="valueChanged" id="Ic4-Rx-Sze"/>
</connections>
</slider>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="40" minValue="30" maxValue="40" translatesAutoresizingMaskIntoConstraints="NO" id="cRz-cV-OIe" customClass="DesignableSlider" customModule="JOCircularSlider_Example" customModuleProvider="target">
<rect key="frame" x="-2" y="87" width="335" height="16"/>
<color key="tintColor" red="0.20392156859999999" green="0.23529411759999999" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="maximumTrackTintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="thumbTintColor" red="0.2530443235" green="0.27250927159999999" blue="0.31792748339999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="image" keyPath="thumbImage" value="thumb"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="changeDotCount:" destination="T5Y-X3-uD8" eventType="valueChanged" id="0ps-pD-G6K"/>
</connections>
</slider>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.083333335816860199" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="DLi-cF-q6u" customClass="DesignableSlider" customModule="JOCircularSlider_Example" customModuleProvider="target">
<rect key="frame" x="-2" y="116" width="335" height="16"/>
<color key="tintColor" red="0.20392156859999999" green="0.23529411759999999" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="maximumTrackTintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="thumbTintColor" red="0.2530443235" green="0.27250927159999999" blue="0.31792748339999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="image" keyPath="thumbImage" value="thumb"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="changeColor:" destination="T5Y-X3-uD8" eventType="valueChanged" id="nOr-Wk-QX0"/>
</connections>
</slider>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="Wvp-Dj-yOk">
<rect key="frame" x="0.0" y="145" width="331" height="29"/>
<segments>
<segment title="Dark"/>
<segment title="Light"/>
</segments>
<color key="tintColor" red="0.33725490200000002" green="0.36470588240000001" blue="0.42352941179999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="toggleTheme:" destination="T5Y-X3-uD8" eventType="valueChanged" id="208-Pl-Ele"/>
</connections>
</segmentedControl>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="wHe-2Y-utO">
<rect key="frame" x="0.0" y="187" width="331" height="29"/>
<segments>
<segment title="Mini"/>
<segment title="Maxi"/>
</segments>
<color key="tintColor" red="0.33725490200000002" green="0.36470588240000001" blue="0.42352941179999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="toggleMiniView:" destination="T5Y-X3-uD8" eventType="valueChanged" id="xKO-sO-xu8"/>
</connections>
</segmentedControl>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="pgh-FY-DH3">
<rect key="frame" x="0.0" y="229" width="331" height="29"/>
<segments>
<segment title="Anti Clockwise"/>
<segment title="Clockwise"/>
</segments>
<color key="tintColor" red="0.33725490200000002" green="0.36470588240000001" blue="0.42352941179999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="toggleDirection:" destination="T5Y-X3-uD8" eventType="valueChanged" id="TJq-7X-Wm4"/>
</connections>
</segmentedControl>
</subviews>
<variation key="heightClass=regular-widthClass=regular" spacing="16"/>
</stackView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="zts-4c-D2G" firstAttribute="trailing" secondItem="P5P-LX-iZM" secondAttribute="trailing" constant="20" id="EOh-gt-afY"/>
<constraint firstItem="P5P-LX-iZM" firstAttribute="top" secondItem="zts-4c-D2G" secondAttribute="top" constant="20" id="Pdn-zc-bQm"/>
<constraint firstItem="6nV-kU-kJg" firstAttribute="centerX" secondItem="zts-4c-D2G" secondAttribute="centerX" id="aJO-QE-46r"/>
<constraint firstItem="P5P-LX-iZM" firstAttribute="leading" secondItem="zts-4c-D2G" secondAttribute="leading" constant="20" id="kv9-bM-Laf"/>
<constraint firstItem="zts-4c-D2G" firstAttribute="bottom" secondItem="6nV-kU-kJg" secondAttribute="bottom" constant="40" id="n5A-FR-aYu"/>
<constraint firstItem="6nV-kU-kJg" firstAttribute="top" secondItem="P5P-LX-iZM" secondAttribute="bottom" constant="25" id="rBl-1f-UNO"/>
<constraint firstItem="6nV-kU-kJg" firstAttribute="width" secondItem="Edf-eP-nqt" secondAttribute="width" multiplier="0.8" id="vXe-Dk-VDm"/>
</constraints>
<viewLayoutGuide key="safeArea" id="zts-4c-D2G"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="color1">
<color key="value" red="0.10980392160000001" green="0.12941176469999999" blue="0.15686274510000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="color2">
<color key="value" red="0.1333333333" green="0.14117647059999999" blue="0.1647058824" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<connections>
<outlet property="circularSlider" destination="fah-tE-CsW" id="Q8q-lf-3Mi"/>
<outlet property="stackView" destination="6nV-kU-kJg" id="1N4-gV-ccl"/>
<outlet property="widthConstraint" destination="wXF-02-uHg" id="UT3-no-Cft"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="bRY-MI-PvD" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="262" y="141"/>
</scene>
</scenes>
<resources>
<image name="thumb" width="16" height="16"/>
</resources>
</document>
@@ -0,0 +1,33 @@
//
// GradientView.swift
// JOCircularSlider_Example
//
// Created by Jalal Ouraigua on 05/12/2018.
// Copyright © 2018 CocoaPods. All rights reserved.
//
import UIKit
@IBDesignable
class GradientView: UIView {
@IBInspectable
var color1: UIColor = .red { didSet { setNeedsDisplay() }}
@IBInspectable
var color2: UIColor = .blue { didSet { setNeedsDisplay() }}
override func draw(_ rect: CGRect) {
let colorSpace = CGColorSpaceCreateDeviceRGB()
let cgColors = [color1.cgColor, color2.cgColor]
let locations: [CGFloat] = [0.0, 1.0]
let context = UIGraphicsGetCurrentContext()!
guard let gradient = CGGradient(colorsSpace: colorSpace, colors: cgColors as CFArray, locations: locations) else { return }
context.drawLinearGradient(gradient, start: .zero, end: CGPoint(x: 0, y: bounds.height), options: CGGradientDrawingOptions(rawValue: 0))
}
}
+46
View File
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
+98
View File
@@ -0,0 +1,98 @@
//
// Utils.swift
// JOCircularSlider_Example
//
// Created by Jalal Ouraigua on 06/12/2018.
// Copyright © 2018 CocoaPods. All rights reserved.
//
import UIKit
import JOCircularSlider
@IBDesignable
class DesignableSlider: UISlider {
@IBInspectable
var thumbImage: UIImage {
get { return currentThumbImage ?? UIImage()}
set { setThumbImage(newValue, for: .normal)}
}
}
enum Theme: Int {
case dark
case light
var gradientViewColor1: UIColor {
switch self {
case .light: return UIColor(red: 239/255.0, green: 239/255.0, blue: 240/255.0, alpha: 1)
case .dark: return UIColor(red: 28/255.0, green: 33/255.0, blue: 40/255.0, alpha: 1)
}
}
var gradientViewColor2: UIColor {
switch self {
case .light: return UIColor(red: 212/255.0, green: 216/255.0, blue: 221/255.0, alpha: 1)
case .dark: return UIColor(red: 34/255.0, green: 36/255.0, blue: 42/255.0, alpha: 1)
}
}
var onColor: UIColor {
return self == .light ? Constants.dotBlueColor : Constants.dotOrangeColor
}
var color1: UIColor {
return self == .light ? Constants.lightColor1 : Constants.darkColor1
}
var color2: UIColor {
return self == .light ? Constants.lightColor2 : Constants.darkColor2
}
var color3: UIColor {
return self == .light ? Constants.lightColor3 : Constants.darkColor3
}
var color4: UIColor {
return self == .light ? Constants.lightColor4 : Constants.darkColor4
}
var highlightColor: UIColor {
return self == .light ? Constants.lightHighlightColor : Constants.darkHighlightColor
}
var textColor: UIColor {
return self == .light ? Constants.lightTextColor : Constants.darkTextColor
}
var maxidotOffColor: UIColor {
return self == .light ? Constants.dotGrayColor : .black
}
var pointerColor1: UIColor {
return self == .light ? Constants.lightColor4 : .black
}
var pointerColor2: UIColor {
return self == .light ? .white : UIColor(red: 65/255.0, green: 69/255.0, blue: 81/255.0, alpha: 1.0)
}
var shadowOpacity: Float {
return self == .light ? 0.4 : 0.8
}
var minidotColor: UIColor {
return self == .light ? Constants.dotGrayColor : .black
}
var minidotHighlightColor: UIColor {
return self == .light ? Constants.lightHighlightColor : Constants.darkHighlightColor
}
}
enum Direction: Int {
case antiClockwise
case clockwise
var startAngle: CGFloat {
return self == .antiClockwise ? 230.0 : 140.0
}
var endAngle: CGFloat {
return self == .antiClockwise ? 310.0 : 40.0
}
}
@@ -0,0 +1,122 @@
//
// ViewController.swift
// JOCircularSlider
//
// Created by Jalal Ouraigua on 12/05/2018.
// Copyright (c) 2018 Jalal Ouraigua. All rights reserved.
//
import UIKit
import JOCircularSlider
class ViewController: UIViewController {
@IBOutlet weak var circularSlider: CircularSlider!
@IBOutlet weak var stackView: UIStackView!
@IBOutlet weak var widthConstraint: NSLayoutConstraint! {
didSet {
let isPad = UIScreen.main.traitCollection.userInterfaceIdiom == .pad
widthConstraint.constant = isPad ? -100.0 : 0
}
}
private var theme: Theme = .dark
@IBAction private func toggleTheme(_ sender: UISegmentedControl) {
guard let theme = Theme(rawValue: sender.selectedSegmentIndex) else { return }
self.theme = theme
if let gradientView = view as? GradientView {
gradientView.color1 = theme.gradientViewColor1
gradientView.color2 = theme.gradientViewColor2
}
circularSlider.color1 = theme.color1
circularSlider.color2 = theme.color2
circularSlider.color3 = theme.color3
circularSlider.color4 = theme.color4
circularSlider.highlightColor = theme.highlightColor
circularSlider.maxidotOnColor = theme.onColor
circularSlider.maxidotOffColor = theme.maxidotOffColor
circularSlider.textColor = theme.textColor
circularSlider.pointerColor1 = theme.pointerColor1
circularSlider.pointerColor2 = theme.pointerColor2
circularSlider.knobShadowOpacity = theme.shadowOpacity
circularSlider.minidotColor = theme.minidotColor
circularSlider.minidotHighlightColor = theme.minidotHighlightColor
// change controls tinit color
let darkColor = UIColor(red: 86/255.0, green: 93/255.0, blue: 108/255.0, alpha: 1)
let lightColor = UIColor(red: 136/255.0, green: 143/255.0, blue: 160/255.0, alpha: 1)
let sliderDark = UIColor(red: 52/255.0, green: 60/255.0, blue: 72/255.0, alpha: 1)
let sliderLight = UIColor(red: 128/255.0, green: 136/255.0, blue: 149/255.0, alpha: 1)
for subview in stackView.subviews {
if let slider = subview as? UISlider {
slider.tintColor = theme == .dark ? sliderDark : sliderLight
slider.maximumTrackTintColor = theme == .dark ? .black : UIColor.white.withAlphaComponent(0.4)
} else {
subview.tintColor = theme == .dark ? darkColor : lightColor
}
}
}
@IBAction private func toggleDirection(_ sender: UISegmentedControl) {
guard let direction = Direction(rawValue: sender.selectedSegmentIndex) else { return }
circularSlider.isClockwise = direction == .clockwise
circularSlider.startAngle = direction.startAngle
circularSlider.endAngle = direction.endAngle
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.circularSlider.setValue(self.circularSlider.value, isPercentage: true)
}
}
@IBAction private func toggleMiniView(_ sender: UISegmentedControl) {
if sender.selectedSegmentIndex == 0 {
circularSlider.minidotViewIsHidden = false
circularSlider.maxidotCount = 10
circularSlider.maxidotMaxDotCount = 3
circularSlider.maxidotRadiusMultiplier = 0.09
circularSlider.minidotColor = theme.minidotColor
} else {
circularSlider.minidotViewIsHidden = true
circularSlider.maxidotCount = 40
circularSlider.maxidotMaxDotCount = 10
circularSlider.maxidotRadiusMultiplier = 0.25
}
}
@IBAction private func changeRadius(_ sender: UISlider) {
let newMultiplier = CGFloat(sender.value)
if sender.tag == 2 {
guard newMultiplier < circularSlider.knobMiddleCircleMultiplier else { return }
circularSlider.knobInnerCircleMultiplier = newMultiplier
} else if sender.tag == 0 {
guard newMultiplier > circularSlider.knobMiddleCircleMultiplier else { return }
circularSlider.knobOuterCircleMultiplier = min(0.99, newMultiplier)
} else {
guard newMultiplier < circularSlider.knobOuterCircleMultiplier &&
newMultiplier > circularSlider.knobInnerCircleMultiplier else { return }
circularSlider.knobMiddleCircleMultiplier = newMultiplier
}
circularSlider.setValue(circularSlider.value, isPercentage: true)
}
@IBAction private func changeDotCount(_ sender: UISlider) {
circularSlider.maxidotCount = Int(sender.value)
circularSlider.maxidotMaxDotCount = Int(sender.value / 5.0)
}
@IBAction private func changeColor(_ sender: UISlider) {
circularSlider.maxidotOnColor = UIColor(hue: CGFloat(sender.value), saturation: 1, brightness: 1, alpha: 1)
}
}
+11
View File
@@ -0,0 +1,11 @@
use_frameworks!
target 'JOCircularSlider_Example' do
pod 'JOCircularSlider', :path => '../'
target 'JOCircularSlider_Tests' do
inherit! :search_paths
end
end
+16
View File
@@ -0,0 +1,16 @@
PODS:
- JOCircularSlider (1.0.0)
DEPENDENCIES:
- JOCircularSlider (from `../`)
EXTERNAL SOURCES:
JOCircularSlider:
:path: "../"
SPEC CHECKSUMS:
JOCircularSlider: b0a2366cc0d303bc43cdf32afb18c266b2448a2c
PODFILE CHECKSUM: 5f59154dfd18781ce4e81da44fa6f83c4aa7dc7e
COCOAPODS: 1.5.3
@@ -0,0 +1,23 @@
{
"name": "JOCircularSlider",
"version": "1.0.0",
"summary": "A highly customaizable and reusable circular slider for iOS applications.",
"description": "A highly customaizable and reusable circular slider for iOS applications.\nIt's written in Swift 4.2 and it's 100% IBDesignable and all parameters are IBInspectable.\nYou can control almost every aspect of the slider's design: Size, colors, direction (clockwise/anti-clockwise), etc...",
"homepage": "https://github.com/ouraigua/JOCircularSlider",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"Jalal Ouraigua": "ouraigua@icloud.com"
},
"source": {
"git": "https://github.com/ouraigua/JOCircularSlider.git",
"tag": "1.0.0"
},
"social_media_url": "https://twitter.com/ouraigua",
"platforms": {
"ios": "10.0"
},
"source_files": "JOCircularSlider/Classes/**/*"
}
+16
View File
@@ -0,0 +1,16 @@
PODS:
- JOCircularSlider (1.0.0)
DEPENDENCIES:
- JOCircularSlider (from `../`)
EXTERNAL SOURCES:
JOCircularSlider:
:path: "../"
SPEC CHECKSUMS:
JOCircularSlider: b0a2366cc0d303bc43cdf32afb18c266b2448a2c
PODFILE CHECKSUM: 5f59154dfd18781ce4e81da44fa6f83c4aa7dc7e
COCOAPODS: 1.5.3
+781
View File
@@ -0,0 +1,781 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
05279D8CE1F1200AF957EDAC29D6F2F0 /* KnobView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 511A3FD0CC1B7D9E0BC547BC230F9BCE /* KnobView.swift */; };
12F27053D39728CFA923CB46C4ECDD21 /* PointerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DDA7BDFDFE92FF13BCA7E6C520F4628 /* PointerView.swift */; };
5F060F7FB32A05BAAA29A6D9263F01BB /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCF5B9FA356380E516F8C5DA28858D85 /* Extensions.swift */; };
70C9290B98764939359E0FC4B75197F1 /* Pods-JOCircularSlider_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F719442F9F6484D94F9C11FB07019FA5 /* Pods-JOCircularSlider_Tests-dummy.m */; };
743D8A879B30AAEFBBCB6285698E2614 /* DotLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1EB77F310C9DD1D4B68D5E9719070E7 /* DotLayer.swift */; };
7953267214D5FC12A34450E2A68B5177 /* DotView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAF121A7E8B96A380A1C158963589A5 /* DotView.swift */; };
7C8197BF929C08A3EC1761C1E64270DA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; };
A17D44DFB87DEA280B732B3AF8D967E0 /* CircularSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49DF3E813FBB60B991AF8ABF1D99DD35 /* CircularSlider.swift */; };
A4822B41F3CCAE0023F3BC499CC78066 /* JOCircularSlider-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 055DFF7240BFA1CF7B6BFA2A1427C4D4 /* JOCircularSlider-dummy.m */; };
ACB71E6A3AFBE042C67CF169038C8341 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; };
B930EA630FA25D9AAFDC53F1D2F851D7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; };
CB45827B6C728467E5C29C39C03FBAB3 /* JOCircularSlider-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D98CC1F161EEF23C0C49EA41ED8C191 /* JOCircularSlider-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
DFC8DE54B07613BEBD7B506B9BAA2F56 /* Pods-JOCircularSlider_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E978690BA7F3A1FC063D21006B9263FD /* Pods-JOCircularSlider_Example-dummy.m */; };
E65586D08045B4A249760F13B8FC4A0D /* Pods-JOCircularSlider_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F52F7FA7AD9981D90CC3A57A289F6E2F /* Pods-JOCircularSlider_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
F279B10D81426CDA2B4D20F24DAD4C39 /* CircularLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ABF840DE693C1FBC775A4DCFC86827E /* CircularLayer.swift */; };
FF15E7C2DF301C3E08B9B0396E91CDB5 /* Pods-JOCircularSlider_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AB054C7D8F8E482A293368177141F5C /* Pods-JOCircularSlider_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
64AF03836747A4595A8A59D132A87385 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
proxyType = 1;
remoteGlobalIDString = 2CCB4C791632458AF59683CD557BD517;
remoteInfo = "Pods-JOCircularSlider_Example";
};
F083CA64179BB8A399A7B71A4098997E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
proxyType = 1;
remoteGlobalIDString = 2A42614483C3321D5589EF03C68BD21C;
remoteInfo = JOCircularSlider;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
055DFF7240BFA1CF7B6BFA2A1427C4D4 /* JOCircularSlider-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JOCircularSlider-dummy.m"; sourceTree = "<group>"; };
10C941578DAC675B26E7D2BE977A3187 /* JOCircularSlider.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = JOCircularSlider.modulemap; sourceTree = "<group>"; };
1126813A0A31B8C635191994BFDAFD80 /* Pods-JOCircularSlider_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-JOCircularSlider_Tests-resources.sh"; sourceTree = "<group>"; };
124E6E7F2F3AC1E2DDF655812490755D /* Pods-JOCircularSlider_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-JOCircularSlider_Example-resources.sh"; sourceTree = "<group>"; };
1D98CC1F161EEF23C0C49EA41ED8C191 /* JOCircularSlider-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JOCircularSlider-umbrella.h"; sourceTree = "<group>"; };
1E344923A86DC0A81E4C07BA034CE2B9 /* Pods-JOCircularSlider_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-JOCircularSlider_Example.modulemap"; sourceTree = "<group>"; };
1EA3738B9F6FC9D9E9CC53A89218FFE6 /* JOCircularSlider.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JOCircularSlider.xcconfig; sourceTree = "<group>"; };
283DBFF0217F9074FA271B49C04EDDF3 /* JOCircularSlider.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = JOCircularSlider.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
2AB054C7D8F8E482A293368177141F5C /* Pods-JOCircularSlider_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-JOCircularSlider_Tests-umbrella.h"; sourceTree = "<group>"; };
2CC40B710FDDCFE776554B242E171266 /* Pods-JOCircularSlider_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-JOCircularSlider_Tests.release.xcconfig"; sourceTree = "<group>"; };
37EEED168D1A7F6AEE096BF5C17E3C6A /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
3ABF840DE693C1FBC775A4DCFC86827E /* CircularLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircularLayer.swift; path = JOCircularSlider/Classes/CircularLayer.swift; sourceTree = "<group>"; };
4611DEA40CAF8910AA63CAF3BF498841 /* Pods-JOCircularSlider_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-JOCircularSlider_Tests-acknowledgements.markdown"; sourceTree = "<group>"; };
48B7A11B996C1E189AF86519B5CDCFDA /* Pods-JOCircularSlider_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-JOCircularSlider_Example.release.xcconfig"; sourceTree = "<group>"; };
49DF3E813FBB60B991AF8ABF1D99DD35 /* CircularSlider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircularSlider.swift; path = JOCircularSlider/Classes/CircularSlider.swift; sourceTree = "<group>"; };
4A951E0E3020FE53E3B5AEA471243508 /* Pods-JOCircularSlider_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-JOCircularSlider_Example-frameworks.sh"; sourceTree = "<group>"; };
50063FA42B13C6AC7E285EF6E17B8455 /* JOCircularSlider.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JOCircularSlider.framework; sourceTree = BUILT_PRODUCTS_DIR; };
511A3FD0CC1B7D9E0BC547BC230F9BCE /* KnobView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KnobView.swift; path = JOCircularSlider/Classes/KnobView.swift; sourceTree = "<group>"; };
55DFD8118B05FC8521CB7DF57B0746D4 /* Pods-JOCircularSlider_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-JOCircularSlider_Example-acknowledgements.plist"; sourceTree = "<group>"; };
568AF9D0143ECC981BB843BAD3BC112B /* Pods-JOCircularSlider_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-JOCircularSlider_Tests-acknowledgements.plist"; sourceTree = "<group>"; };
5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
5AA090443210B9C2074BBFAD0869AEFB /* Pods_JOCircularSlider_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JOCircularSlider_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7164A283EBCA7EE531EE222B97526C3F /* Pods-JOCircularSlider_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-JOCircularSlider_Tests.modulemap"; sourceTree = "<group>"; };
7673E2270A3C81C4B151CF5D1874537F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7BFFA5FCAE14A56F30463F7B0E68640E /* Pods-JOCircularSlider_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-JOCircularSlider_Tests-frameworks.sh"; sourceTree = "<group>"; };
8B7D9647D18079672F29FB498A56A9A6 /* Pods-JOCircularSlider_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-JOCircularSlider_Example.debug.xcconfig"; sourceTree = "<group>"; };
8D5270DA20CB96F2275E1E0914FF954D /* Pods_JOCircularSlider_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_JOCircularSlider_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8DDA7BDFDFE92FF13BCA7E6C520F4628 /* PointerView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PointerView.swift; path = JOCircularSlider/Classes/PointerView.swift; sourceTree = "<group>"; };
93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
A96DA4DDC2B4AC7D9A99ED654664BC6D /* Pods-JOCircularSlider_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-JOCircularSlider_Example-acknowledgements.markdown"; sourceTree = "<group>"; };
ACF26235D8F9ADBEB158E39410E4FE4D /* Pods-JOCircularSlider_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-JOCircularSlider_Tests.debug.xcconfig"; sourceTree = "<group>"; };
BCF5B9FA356380E516F8C5DA28858D85 /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = JOCircularSlider/Classes/Extensions.swift; sourceTree = "<group>"; };
CAAF121A7E8B96A380A1C158963589A5 /* DotView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotView.swift; path = JOCircularSlider/Classes/DotView.swift; sourceTree = "<group>"; };
CD21EC5BAE764CEDD8D583720BBACC72 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E1CCB62F96EF4B239F67139B8A637494 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E978690BA7F3A1FC063D21006B9263FD /* Pods-JOCircularSlider_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-JOCircularSlider_Example-dummy.m"; sourceTree = "<group>"; };
EDF93F568BFA660B4285D25E97969A33 /* JOCircularSlider-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JOCircularSlider-prefix.pch"; sourceTree = "<group>"; };
F1EB77F310C9DD1D4B68D5E9719070E7 /* DotLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DotLayer.swift; path = JOCircularSlider/Classes/DotLayer.swift; sourceTree = "<group>"; };
F2DC93DA42DEA05746E0269A192A8073 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
F52F7FA7AD9981D90CC3A57A289F6E2F /* Pods-JOCircularSlider_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-JOCircularSlider_Example-umbrella.h"; sourceTree = "<group>"; };
F719442F9F6484D94F9C11FB07019FA5 /* Pods-JOCircularSlider_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-JOCircularSlider_Tests-dummy.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
7438E9CF5852506D4AE664BC9EA185EB /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
ACB71E6A3AFBE042C67CF169038C8341 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
B028D2FBBA4864D4BFBB93B13F6964B1 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7C8197BF929C08A3EC1761C1E64270DA /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C649589484C807AFB3C599769C2E2627 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B930EA630FA25D9AAFDC53F1D2F851D7 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
2B9331F372F863CC19437A93A047FABD /* Pods-JOCircularSlider_Tests */ = {
isa = PBXGroup;
children = (
CD21EC5BAE764CEDD8D583720BBACC72 /* Info.plist */,
7164A283EBCA7EE531EE222B97526C3F /* Pods-JOCircularSlider_Tests.modulemap */,
4611DEA40CAF8910AA63CAF3BF498841 /* Pods-JOCircularSlider_Tests-acknowledgements.markdown */,
568AF9D0143ECC981BB843BAD3BC112B /* Pods-JOCircularSlider_Tests-acknowledgements.plist */,
F719442F9F6484D94F9C11FB07019FA5 /* Pods-JOCircularSlider_Tests-dummy.m */,
7BFFA5FCAE14A56F30463F7B0E68640E /* Pods-JOCircularSlider_Tests-frameworks.sh */,
1126813A0A31B8C635191994BFDAFD80 /* Pods-JOCircularSlider_Tests-resources.sh */,
2AB054C7D8F8E482A293368177141F5C /* Pods-JOCircularSlider_Tests-umbrella.h */,
ACF26235D8F9ADBEB158E39410E4FE4D /* Pods-JOCircularSlider_Tests.debug.xcconfig */,
2CC40B710FDDCFE776554B242E171266 /* Pods-JOCircularSlider_Tests.release.xcconfig */,
);
name = "Pods-JOCircularSlider_Tests";
path = "Target Support Files/Pods-JOCircularSlider_Tests";
sourceTree = "<group>";
};
3FE78CE3B16ADBAC28765962CA8665D9 /* Development Pods */ = {
isa = PBXGroup;
children = (
CAFE5E995F49941BFC8AF0146DBA24E6 /* JOCircularSlider */,
);
name = "Development Pods";
sourceTree = "<group>";
};
5E0D919E635D23B70123790B8308F8EF /* iOS */ = {
isa = PBXGroup;
children = (
5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */,
);
name = iOS;
sourceTree = "<group>";
};
7DB346D0F39D3F0E887471402A8071AB = {
isa = PBXGroup;
children = (
93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */,
3FE78CE3B16ADBAC28765962CA8665D9 /* Development Pods */,
BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */,
EA8D4B3B5FEB73B4671BCF5A2FB85670 /* Products */,
B8E87721827A3E21EF0B3D27C948B92D /* Targets Support Files */,
);
sourceTree = "<group>";
};
B0A7FBD2E2F11ED5BDE8DE07C0FCEB24 /* Support Files */ = {
isa = PBXGroup;
children = (
E1CCB62F96EF4B239F67139B8A637494 /* Info.plist */,
10C941578DAC675B26E7D2BE977A3187 /* JOCircularSlider.modulemap */,
1EA3738B9F6FC9D9E9CC53A89218FFE6 /* JOCircularSlider.xcconfig */,
055DFF7240BFA1CF7B6BFA2A1427C4D4 /* JOCircularSlider-dummy.m */,
EDF93F568BFA660B4285D25E97969A33 /* JOCircularSlider-prefix.pch */,
1D98CC1F161EEF23C0C49EA41ED8C191 /* JOCircularSlider-umbrella.h */,
);
name = "Support Files";
path = "Example/Pods/Target Support Files/JOCircularSlider";
sourceTree = "<group>";
};
B8E87721827A3E21EF0B3D27C948B92D /* Targets Support Files */ = {
isa = PBXGroup;
children = (
CE3DB4C740DB3F63ABEF4002FD93E4A1 /* Pods-JOCircularSlider_Example */,
2B9331F372F863CC19437A93A047FABD /* Pods-JOCircularSlider_Tests */,
);
name = "Targets Support Files";
sourceTree = "<group>";
};
BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = {
isa = PBXGroup;
children = (
5E0D919E635D23B70123790B8308F8EF /* iOS */,
);
name = Frameworks;
sourceTree = "<group>";
};
CAFE5E995F49941BFC8AF0146DBA24E6 /* JOCircularSlider */ = {
isa = PBXGroup;
children = (
49DF3E813FBB60B991AF8ABF1D99DD35 /* CircularSlider.swift */,
3ABF840DE693C1FBC775A4DCFC86827E /* CircularLayer.swift */,
F1EB77F310C9DD1D4B68D5E9719070E7 /* DotLayer.swift */,
CAAF121A7E8B96A380A1C158963589A5 /* DotView.swift */,
BCF5B9FA356380E516F8C5DA28858D85 /* Extensions.swift */,
511A3FD0CC1B7D9E0BC547BC230F9BCE /* KnobView.swift */,
8DDA7BDFDFE92FF13BCA7E6C520F4628 /* PointerView.swift */,
CE9DED3ED126B070304870EE7BEA6C69 /* Pod */,
B0A7FBD2E2F11ED5BDE8DE07C0FCEB24 /* Support Files */,
);
name = JOCircularSlider;
path = ../..;
sourceTree = "<group>";
};
CE3DB4C740DB3F63ABEF4002FD93E4A1 /* Pods-JOCircularSlider_Example */ = {
isa = PBXGroup;
children = (
7673E2270A3C81C4B151CF5D1874537F /* Info.plist */,
1E344923A86DC0A81E4C07BA034CE2B9 /* Pods-JOCircularSlider_Example.modulemap */,
A96DA4DDC2B4AC7D9A99ED654664BC6D /* Pods-JOCircularSlider_Example-acknowledgements.markdown */,
55DFD8118B05FC8521CB7DF57B0746D4 /* Pods-JOCircularSlider_Example-acknowledgements.plist */,
E978690BA7F3A1FC063D21006B9263FD /* Pods-JOCircularSlider_Example-dummy.m */,
4A951E0E3020FE53E3B5AEA471243508 /* Pods-JOCircularSlider_Example-frameworks.sh */,
124E6E7F2F3AC1E2DDF655812490755D /* Pods-JOCircularSlider_Example-resources.sh */,
F52F7FA7AD9981D90CC3A57A289F6E2F /* Pods-JOCircularSlider_Example-umbrella.h */,
8B7D9647D18079672F29FB498A56A9A6 /* Pods-JOCircularSlider_Example.debug.xcconfig */,
48B7A11B996C1E189AF86519B5CDCFDA /* Pods-JOCircularSlider_Example.release.xcconfig */,
);
name = "Pods-JOCircularSlider_Example";
path = "Target Support Files/Pods-JOCircularSlider_Example";
sourceTree = "<group>";
};
CE9DED3ED126B070304870EE7BEA6C69 /* Pod */ = {
isa = PBXGroup;
children = (
283DBFF0217F9074FA271B49C04EDDF3 /* JOCircularSlider.podspec */,
F2DC93DA42DEA05746E0269A192A8073 /* LICENSE */,
37EEED168D1A7F6AEE096BF5C17E3C6A /* README.md */,
);
name = Pod;
sourceTree = "<group>";
};
EA8D4B3B5FEB73B4671BCF5A2FB85670 /* Products */ = {
isa = PBXGroup;
children = (
50063FA42B13C6AC7E285EF6E17B8455 /* JOCircularSlider.framework */,
5AA090443210B9C2074BBFAD0869AEFB /* Pods_JOCircularSlider_Example.framework */,
8D5270DA20CB96F2275E1E0914FF954D /* Pods_JOCircularSlider_Tests.framework */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
63821404BE470CE586DA340F28804187 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
E65586D08045B4A249760F13B8FC4A0D /* Pods-JOCircularSlider_Example-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F011FBC5D8948E768570BFC9905CD4D9 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
CB45827B6C728467E5C29C39C03FBAB3 /* JOCircularSlider-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F0D5589F6BFB898C240D78ABD1ACDFA6 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
FF15E7C2DF301C3E08B9B0396E91CDB5 /* Pods-JOCircularSlider_Tests-umbrella.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
2A42614483C3321D5589EF03C68BD21C /* JOCircularSlider */ = {
isa = PBXNativeTarget;
buildConfigurationList = 0A1931342F54678BDFD91384098CB8A4 /* Build configuration list for PBXNativeTarget "JOCircularSlider" */;
buildPhases = (
196757FD96C2CE5D5716EAE9DD7F5FBB /* Sources */,
C649589484C807AFB3C599769C2E2627 /* Frameworks */,
F011FBC5D8948E768570BFC9905CD4D9 /* Headers */,
);
buildRules = (
);
dependencies = (
);
name = JOCircularSlider;
productName = JOCircularSlider;
productReference = 50063FA42B13C6AC7E285EF6E17B8455 /* JOCircularSlider.framework */;
productType = "com.apple.product-type.framework";
};
2CCB4C791632458AF59683CD557BD517 /* Pods-JOCircularSlider_Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = F6DF00727E2194D7575EB029D994DB1E /* Build configuration list for PBXNativeTarget "Pods-JOCircularSlider_Example" */;
buildPhases = (
1F42A865DDA56938AD2644C78F7AD70C /* Sources */,
B028D2FBBA4864D4BFBB93B13F6964B1 /* Frameworks */,
63821404BE470CE586DA340F28804187 /* Headers */,
);
buildRules = (
);
dependencies = (
FCF3F5CB2C104CFB3F7BDEE99CFFC8F3 /* PBXTargetDependency */,
);
name = "Pods-JOCircularSlider_Example";
productName = "Pods-JOCircularSlider_Example";
productReference = 5AA090443210B9C2074BBFAD0869AEFB /* Pods_JOCircularSlider_Example.framework */;
productType = "com.apple.product-type.framework";
};
D5C1E7F21FD53DDC03B60ED681E12EE2 /* Pods-JOCircularSlider_Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 209425E640BF54E03D1A10755953714E /* Build configuration list for PBXNativeTarget "Pods-JOCircularSlider_Tests" */;
buildPhases = (
CCE9B2A62FDB8B25784DA49E07CC0481 /* Sources */,
7438E9CF5852506D4AE664BC9EA185EB /* Frameworks */,
F0D5589F6BFB898C240D78ABD1ACDFA6 /* Headers */,
);
buildRules = (
);
dependencies = (
43AD10C93DE35806B814600E216AA13E /* PBXTargetDependency */,
);
name = "Pods-JOCircularSlider_Tests";
productName = "Pods-JOCircularSlider_Tests";
productReference = 8D5270DA20CB96F2275E1E0914FF954D /* Pods_JOCircularSlider_Tests.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D41D8CD98F00B204E9800998ECF8427E /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0930;
LastUpgradeCheck = 1010;
};
buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 7DB346D0F39D3F0E887471402A8071AB;
productRefGroup = EA8D4B3B5FEB73B4671BCF5A2FB85670 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
2A42614483C3321D5589EF03C68BD21C /* JOCircularSlider */,
2CCB4C791632458AF59683CD557BD517 /* Pods-JOCircularSlider_Example */,
D5C1E7F21FD53DDC03B60ED681E12EE2 /* Pods-JOCircularSlider_Tests */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
196757FD96C2CE5D5716EAE9DD7F5FBB /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F279B10D81426CDA2B4D20F24DAD4C39 /* CircularLayer.swift in Sources */,
A17D44DFB87DEA280B732B3AF8D967E0 /* CircularSlider.swift in Sources */,
743D8A879B30AAEFBBCB6285698E2614 /* DotLayer.swift in Sources */,
7953267214D5FC12A34450E2A68B5177 /* DotView.swift in Sources */,
5F060F7FB32A05BAAA29A6D9263F01BB /* Extensions.swift in Sources */,
A4822B41F3CCAE0023F3BC499CC78066 /* JOCircularSlider-dummy.m in Sources */,
05279D8CE1F1200AF957EDAC29D6F2F0 /* KnobView.swift in Sources */,
12F27053D39728CFA923CB46C4ECDD21 /* PointerView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1F42A865DDA56938AD2644C78F7AD70C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DFC8DE54B07613BEBD7B506B9BAA2F56 /* Pods-JOCircularSlider_Example-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
CCE9B2A62FDB8B25784DA49E07CC0481 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
70C9290B98764939359E0FC4B75197F1 /* Pods-JOCircularSlider_Tests-dummy.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
43AD10C93DE35806B814600E216AA13E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "Pods-JOCircularSlider_Example";
target = 2CCB4C791632458AF59683CD557BD517 /* Pods-JOCircularSlider_Example */;
targetProxy = 64AF03836747A4595A8A59D132A87385 /* PBXContainerItemProxy */;
};
FCF3F5CB2C104CFB3F7BDEE99CFFC8F3 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = JOCircularSlider;
target = 2A42614483C3321D5589EF03C68BD21C /* JOCircularSlider */;
targetProxy = F083CA64179BB8A399A7B71A4098997E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
553022A828EE1991F07D2D73F565AEF8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGNING_ALLOWED = NO;
CODE_SIGNING_REQUIRED = NO;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_DEBUG=1",
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SYMROOT = "${SRCROOT}/../build";
};
name = Debug;
};
56CF0B05250F73FA4BBE993053B7FF26 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8B7D9647D18079672F29FB498A56A9A6 /* Pods-JOCircularSlider_Example.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-JOCircularSlider_Example/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-JOCircularSlider_Example/Pods-JOCircularSlider_Example.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
58CE816B060A41D32CEC095441D0E3E0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGNING_ALLOWED = NO;
CODE_SIGNING_REQUIRED = NO;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"POD_CONFIGURATION_RELEASE=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_COMPILATION_MODE = wholemodule;
SYMROOT = "${SRCROOT}/../build";
};
name = Release;
};
6D1C55C7B5F52D17203ADDA3DB161467 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 48B7A11B996C1E189AF86519B5CDCFDA /* Pods-JOCircularSlider_Example.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-JOCircularSlider_Example/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-JOCircularSlider_Example/Pods-JOCircularSlider_Example.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
80D1221CF6C5EAA2BE014E01FDA7EC8A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 2CC40B710FDDCFE776554B242E171266 /* Pods-JOCircularSlider_Tests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-JOCircularSlider_Tests/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-JOCircularSlider_Tests/Pods-JOCircularSlider_Tests.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
A8083007596766E5BFE5D074F9E38637 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = ACF26235D8F9ADBEB158E39410E4FE4D /* Pods-JOCircularSlider_Tests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
CLANG_ENABLE_OBJC_WEAK = NO;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Target Support Files/Pods-JOCircularSlider_Tests/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "Target Support Files/Pods-JOCircularSlider_Tests/Pods-JOCircularSlider_Tests.modulemap";
OTHER_LDFLAGS = "";
OTHER_LIBTOOLFLAGS = "";
PODS_ROOT = "$(SRCROOT)";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
B423F40E00D778102466C6FDAC5390ED /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1EA3738B9F6FC9D9E9CC53A89218FFE6 /* JOCircularSlider.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = NO;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/JOCircularSlider/JOCircularSlider-prefix.pch";
INFOPLIST_FILE = "Target Support Files/JOCircularSlider/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/JOCircularSlider/JOCircularSlider.modulemap";
PRODUCT_MODULE_NAME = JOCircularSlider;
PRODUCT_NAME = JOCircularSlider;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
B57483A9C7C2B7E944BF08A4103145A6 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1EA3738B9F6FC9D9E9CC53A89218FFE6 /* JOCircularSlider.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = NO;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREFIX_HEADER = "Target Support Files/JOCircularSlider/JOCircularSlider-prefix.pch";
INFOPLIST_FILE = "Target Support Files/JOCircularSlider/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MODULEMAP_FILE = "Target Support Files/JOCircularSlider/JOCircularSlider.modulemap";
PRODUCT_MODULE_NAME = JOCircularSlider;
PRODUCT_NAME = JOCircularSlider;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
0A1931342F54678BDFD91384098CB8A4 /* Build configuration list for PBXNativeTarget "JOCircularSlider" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B57483A9C7C2B7E944BF08A4103145A6 /* Debug */,
B423F40E00D778102466C6FDAC5390ED /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
209425E640BF54E03D1A10755953714E /* Build configuration list for PBXNativeTarget "Pods-JOCircularSlider_Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
A8083007596766E5BFE5D074F9E38637 /* Debug */,
80D1221CF6C5EAA2BE014E01FDA7EC8A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = {
isa = XCConfigurationList;
buildConfigurations = (
553022A828EE1991F07D2D73F565AEF8 /* Debug */,
58CE816B060A41D32CEC095441D0E3E0 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F6DF00727E2194D7575EB029D994DB1E /* Build configuration list for PBXNativeTarget "Pods-JOCircularSlider_Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
56CF0B05250F73FA4BBE993053B7FF26 /* Debug */,
6D1C55C7B5F52D17203ADDA3DB161467 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
@@ -0,0 +1,5 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_JOCircularSlider : NSObject
@end
@implementation PodsDummy_JOCircularSlider
@end
@@ -0,0 +1,12 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
@@ -0,0 +1,16 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double JOCircularSliderVersionNumber;
FOUNDATION_EXPORT const unsigned char JOCircularSliderVersionString[];
@@ -0,0 +1,6 @@
framework module JOCircularSlider {
umbrella header "JOCircularSlider-umbrella.h"
export *
module * { export * }
}
@@ -0,0 +1,9 @@
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JOCircularSlider
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
@@ -0,0 +1,26 @@
# Acknowledgements
This application makes use of the following third party libraries:
## JOCircularSlider
Copyright (c) 2018 Jalal Ouraigua <ouraigua@icloud.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Generated by CocoaPods - https://cocoapods.org
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2018 Jalal Ouraigua &lt;ouraigua@icloud.com&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>JOCircularSlider</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - https://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
@@ -0,0 +1,5 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_JOCircularSlider_Example : NSObject
@end
@implementation PodsDummy_Pods_JOCircularSlider_Example
@end
@@ -0,0 +1,153 @@
#!/bin/sh
set -e
set -u
set -o pipefail
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the script phase was successful).
exit 0
fi
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RETVAL=0
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
# Copies and strips a vendored framework
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
# Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
strip_invalid_archs "$binary"
fi
# Resign the code if required by the build settings to avoid unstable apps
code_sign_if_enabled "${destination}/$(basename "$1")"
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
code_sign_if_enabled "${destination}/${lib}"
done
fi
}
# Copies and strips a vendored dSYM
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
# Copy the dSYM into a the targets temp dir.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
local basename
basename="$(basename -s .framework.dSYM "$source")"
binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then
strip_invalid_archs "$binary"
fi
if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
# Move the stripped file into its final destination.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
else
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
fi
fi
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identitiy
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
fi
echo "$code_sign_cmd"
eval "$code_sign_cmd"
fi
}
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
# Get architectures for current target binary
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
# Intersect them with the architectures we are building for
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
# If there are no archs supported by this binary then warn the user
if [[ -z "$intersected_archs" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
STRIP_BINARY_RETVAL=0
return
fi
stripped=""
for arch in $binary_archs; do
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
STRIP_BINARY_RETVAL=1
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/JOCircularSlider/JOCircularSlider.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/JOCircularSlider/JOCircularSlider.framework"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait
fi
@@ -0,0 +1,118 @@
#!/bin/sh
set -e
set -u
set -o pipefail
if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
# If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
# resources to, so exit 0 (signalling the script phase was successful).
exit 0
fi
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY:-}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
;;
1)
TARGET_DEVICE_ARGS="--target-device iphone"
;;
2)
TARGET_DEVICE_ARGS="--target-device ipad"
;;
3)
TARGET_DEVICE_ARGS="--target-device tv"
;;
4)
TARGET_DEVICE_ARGS="--target-device watch"
;;
*)
TARGET_DEVICE_ARGS="--target-device mac"
;;
esac
install_resource()
{
if [[ "$1" = /* ]] ; then
RESOURCE_PATH="$1"
else
RESOURCE_PATH="${PODS_ROOT}/$1"
fi
if [[ ! -e "$RESOURCE_PATH" ]] ; then
cat << EOM
error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
EOM
exit 1
fi
case $RESOURCE_PATH in
*.storyboard)
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}" || true
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}
;;
*.xib)
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}" || true
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}
;;
*.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;;
*.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
*.xcassets)
ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
*)
echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;;
esac
}
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
rm -f "$RESOURCES_TO_COPY"
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
then
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
while read line; do
if [[ $line != "${PODS_ROOT}*" ]]; then
XCASSET_FILES+=("$line")
fi
done <<<"$OTHER_XCASSETS"
if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
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}"
else
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}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
fi
fi
@@ -0,0 +1,16 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double Pods_JOCircularSlider_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_JOCircularSlider_ExampleVersionString[];
@@ -0,0 +1,11 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JOCircularSlider"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/JOCircularSlider/JOCircularSlider.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "JOCircularSlider"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
@@ -0,0 +1,6 @@
framework module Pods_JOCircularSlider_Example {
umbrella header "Pods-JOCircularSlider_Example-umbrella.h"
export *
module * { export * }
}
@@ -0,0 +1,11 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JOCircularSlider"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/JOCircularSlider/JOCircularSlider.framework/Headers"
OTHER_LDFLAGS = $(inherited) -framework "JOCircularSlider"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
@@ -0,0 +1,3 @@
# Acknowledgements
This application makes use of the following third party libraries:
Generated by CocoaPods - https://cocoapods.org
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - https://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
@@ -0,0 +1,5 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_JOCircularSlider_Tests : NSObject
@end
@implementation PodsDummy_Pods_JOCircularSlider_Tests
@end
@@ -0,0 +1,146 @@
#!/bin/sh
set -e
set -u
set -o pipefail
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the script phase was successful).
exit 0
fi
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
# Used as a return value for each invocation of `strip_invalid_archs` function.
STRIP_BINARY_RETVAL=0
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
# Copies and strips a vendored framework
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
# Use filter instead of exclude so missing patterns don't throw errors.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
strip_invalid_archs "$binary"
fi
# Resign the code if required by the build settings to avoid unstable apps
code_sign_if_enabled "${destination}/$(basename "$1")"
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
code_sign_if_enabled "${destination}/${lib}"
done
fi
}
# Copies and strips a vendored dSYM
install_dsym() {
local source="$1"
if [ -r "$source" ]; then
# Copy the dSYM into a the targets temp dir.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}"
local basename
basename="$(basename -s .framework.dSYM "$source")"
binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}"
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then
strip_invalid_archs "$binary"
fi
if [[ $STRIP_BINARY_RETVAL == 1 ]]; then
# Move the stripped file into its final destination.
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\""
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}"
else
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
fi
fi
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identitiy
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
fi
echo "$code_sign_cmd"
eval "$code_sign_cmd"
fi
}
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
# Get architectures for current target binary
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
# Intersect them with the architectures we are building for
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)"
# If there are no archs supported by this binary then warn the user
if [[ -z "$intersected_archs" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
STRIP_BINARY_RETVAL=0
return
fi
stripped=""
for arch in $binary_archs; do
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
STRIP_BINARY_RETVAL=1
}
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait
fi
@@ -0,0 +1,118 @@
#!/bin/sh
set -e
set -u
set -o pipefail
if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
# If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
# resources to, so exit 0 (signalling the script phase was successful).
exit 0
fi
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
XCASSET_FILES=()
# This protects against multiple targets copying the same framework dependency at the same time. The solution
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
case "${TARGETED_DEVICE_FAMILY:-}" in
1,2)
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
;;
1)
TARGET_DEVICE_ARGS="--target-device iphone"
;;
2)
TARGET_DEVICE_ARGS="--target-device ipad"
;;
3)
TARGET_DEVICE_ARGS="--target-device tv"
;;
4)
TARGET_DEVICE_ARGS="--target-device watch"
;;
*)
TARGET_DEVICE_ARGS="--target-device mac"
;;
esac
install_resource()
{
if [[ "$1" = /* ]] ; then
RESOURCE_PATH="$1"
else
RESOURCE_PATH="${PODS_ROOT}/$1"
fi
if [[ ! -e "$RESOURCE_PATH" ]] ; then
cat << EOM
error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
EOM
exit 1
fi
case $RESOURCE_PATH in
*.storyboard)
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}" || true
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}
;;
*.xib)
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}" || true
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}
;;
*.framework)
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
;;
*.xcmappingmodel)
echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
;;
*.xcassets)
ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
;;
*)
echo "$RESOURCE_PATH" || true
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
;;
esac
}
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
fi
rm -f "$RESOURCES_TO_COPY"
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
then
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d)
while read line; do
if [[ $line != "${PODS_ROOT}*" ]]; then
XCASSET_FILES+=("$line")
fi
done <<<"$OTHER_XCASSETS"
if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
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}"
else
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}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
fi
fi
@@ -0,0 +1,16 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double Pods_JOCircularSlider_TestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_JOCircularSlider_TestsVersionString[];
@@ -0,0 +1,8 @@
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JOCircularSlider"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/JOCircularSlider/JOCircularSlider.framework/Headers"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
@@ -0,0 +1,6 @@
framework module Pods_JOCircularSlider_Tests {
umbrella header "Pods-JOCircularSlider_Tests-umbrella.h"
export *
module * { export * }
}
@@ -0,0 +1,8 @@
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JOCircularSlider"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/JOCircularSlider/JOCircularSlider.framework/Headers"
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
+28
View File
@@ -0,0 +1,28 @@
import XCTest
import JOCircularSlider
class Tests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure() {
// Put the code you want to measure the time of here.
}
}
}
+46
View File
@@ -0,0 +1,46 @@
#
# Be sure to run `pod lib lint JOCircularSlider.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'JOCircularSlider'
s.version = '1.0.3'
s.summary = 'A highly customisable and reusable iOS circular slider.'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
JOCircularSlider is a highly customisable and reusable iOS circular slider that mimics the behaviour of a knob control. It uses no preset images and every one of its components is drawn completely in code making it extremely adaptable to every design and theme.
It's written in Swift 4.2 and it's 100% IBDesignable and all parameters are IBInspectable.
You can control almost every aspect of the slider's design: Size, colors, direction (clockwise/anti-clockwise), etc...
DESC
s.homepage = 'https://github.com/ouraigua/JOCircularSlider'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Jalal Ouraigua' => 'ouraigua@icloud.com' }
s.source = { :git => 'https://github.com/ouraigua/JOCircularSlider.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/ouraigua'
s.ios.deployment_target = '10.0'
s.source_files = 'JOCircularSlider/Classes/**/*'
s.documentation_url = 'http://ouraigua.com/github/jocircularslider/docs/index.html'
# s.resource_bundles = {
# 'JOCircularSlider' => ['JOCircularSlider/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
end
View File
View File
@@ -0,0 +1,131 @@
//
// CircularLayer.swift
// JOCircularSlider
//
// Created by Jalal Ouraigua on 04/12/2018.
// Copyright © 2018 Jalal Ouraigua. All rights reserved.
//
import UIKit
public enum CircleMaskType {
case stroke(width: CGFloat)
case fill
}
public enum GradientType {
case linear(direction: GradientDirection)
case radial
}
public enum GradientDirection: Int {
case leftToRight
case rightToLeft
case topToBottom
case bottomToTop
case topLeftToBottomRight
case topRightToBottomLeft
case bottomLeftToTopRight
case bottomRightToTopLeft
func coordinates(for rect: CGRect) -> (start: CGPoint, end: CGPoint) {
switch self {
case .leftToRight: return (CGPoint(x: 0, y: 0), CGPoint(x: rect.width, y: 0))
case .rightToLeft: return (CGPoint(x: rect.width, y: 0), CGPoint(x: 0, y: 0))
case .topToBottom: return (CGPoint(x: 0, y: 0), CGPoint(x: 0, y: rect.height))
case .bottomToTop: return (CGPoint(x: 0, y: rect.height), CGPoint(x: 0, y: 0))
case .topLeftToBottomRight: return (CGPoint(x: 0, y: 0), CGPoint(x: rect.width, y: rect.height))
case .topRightToBottomLeft: return (CGPoint(x: rect.width, y: 0), CGPoint(x: 0, y: rect.height))
case .bottomLeftToTopRight: return (CGPoint(x: 0, y: rect.height), CGPoint(x: rect.width, y: 0))
case .bottomRightToTopLeft: return (CGPoint(x: rect.width, y: rect.height), CGPoint(x: 0, y: 0))
}
}
}
class CircularLayer: CALayer {
// MARK: - Public Properties
var gradientType: GradientType = .linear(direction: .topToBottom) {
didSet { setNeedsDisplay() }
}
var locations: [CGFloat] = [0.0, 1.0] {
didSet { setNeedsDisplay() }
}
var colors: [UIColor] = [.red, .blue] {
didSet { setNeedsDisplay() }
}
var maskType: CircleMaskType = .fill {
didSet { setNeedsDisplay() }
}
var multiplier: CGFloat = 1.0 {
didSet { setNeedsDisplay() }
}
// MARK: - Private Properties
fileprivate let maskLayer = CAShapeLayer()
private var center: CGPoint {
return CGPoint(x: bounds.width/2, y: bounds.height/2)
}
private var radius: CGFloat {
return (bounds.width + bounds.height)/2
}
private var cgColors: [CGColor] {
return colors.map {$0.cgColor}
}
// MARK: - Init
init(gradientType: GradientType = .linear(direction: .topToBottom),
colors: [UIColor],
maskType: CircleMaskType,
locations: [CGFloat] = [0.0, 1.0],
multiplier: CGFloat = 1.0) {
self.gradientType = gradientType
self.colors = colors
self.maskType = maskType
self.locations = locations
self.multiplier = multiplier
super.init()
needsDisplayOnBoundsChange = true
}
required init?(coder aDecoder: NSCoder) {
super.init()
needsDisplayOnBoundsChange = true
}
override init(layer: Any) {
super.init(layer: layer)
needsDisplayOnBoundsChange = true
}
override func draw(in ctx: CGContext) {
let colorSpace = CGColorSpaceCreateDeviceRGB()
guard let gradient = CGGradient(colorsSpace: colorSpace, colors: cgColors as CFArray, locations: locations) else { return }
switch gradientType {
case .radial:
ctx.drawRadialGradient(gradient, startCenter: center, startRadius: 0.0, endCenter: center, endRadius: radius, options: CGGradientDrawingOptions(rawValue: 0))
case .linear(let direction):
let coordinates = direction.coordinates(for: bounds)
ctx.drawLinearGradient(gradient, start: coordinates.start, end: coordinates.end, options: CGGradientDrawingOptions(rawValue: 0))
}
switch maskType {
case .fill: break
case .stroke(let width):
maskLayer.fillColor = UIColor.clear.cgColor
maskLayer.lineWidth = width
maskLayer.strokeColor = UIColor.black.cgColor
}
maskLayer.path = circlePath(with: multiplier).cgPath
self.mask = maskLayer
}
}
@@ -0,0 +1,542 @@
//
// CircularSlider.swift
// JOCircularSlider
//
// Created by Jalal Ouraigua on 04/12/2018.
// Copyright © 2018 Jalal Ouraigua. All rights reserved.
//
import UIKit
public struct Constants {
public static let lightTextColor = UIColor(red: 204/255.0, green: 204/255.0, blue: 204/255.0, alpha: 1)
public static let darkTextColor = UIColor.black
public static let fontName = "HelveticaNeue-Light" // HelveticaNeue-Light Helvetica-Bold
public static let lightColor1 = UIColor(red: 226/255.0, green: 226/255.0, blue: 226/255.0, alpha: 0.2)
public static let lightColor2 = UIColor(red: 249/255.0, green: 249/255.0, blue: 249/255.0, alpha: 1)
public static let lightColor3 = UIColor(red: 173/255.0, green: 174/255.0, blue: 175/255.0, alpha: 1)
public static let lightColor4 = UIColor(red: 206/255.0, green: 206/255.0, blue: 206/255.0, alpha: 1)
public static let darkColor1 = UIColor.black
public static let darkColor2 = UIColor(red: 39/255.0, green: 46/255.0, blue: 56/255.0, alpha: 1)
public static let darkColor3 = UIColor.black
public static let darkColor4 = UIColor(red: 34/255.0, green: 37/255.0, blue: 44/255.0, alpha: 1)
public static let lightHighlightColor = UIColor.white
public static let darkHighlightColor = UIColor(red: 86/255.0, green: 93/255.0, blue: 108/255.0, alpha: 1)
public static let dotBlueColor = UIColor(red: 31/255.0, green: 206/255.0, blue: 252/255.0, alpha: 1)
public static let dotRedColor = UIColor(red: 248/255.0, green: 16/255.0, blue: 32/255.0, alpha: 1)
public static let dotOrangeColor = UIColor(red: 1, green: 128/255.0, blue: 0, alpha: 1)
public static let dotGrayColor = lightColor4
public static let dotShadowOffset = CGSize(width: 2, height: 2)
public static let outerMultiplier : CGFloat = 0.86
public static let middleMultiplier : CGFloat = 0.7
public static let innerMultiplier : CGFloat = 0.54
}
@IBDesignable
open class CircularSlider: UIControl {
// MARK: - Public API
@IBInspectable open var color1: UIColor {
get { return renderer.knobView.color1 }
set { renderer.knobView.color1 = newValue }
}
@IBInspectable open var color2: UIColor {
get { return renderer.knobView.color2 }
set { renderer.knobView.color2 = newValue}
}
@IBInspectable open var color3: UIColor {
get { return renderer.knobView.color3 }
set { renderer.knobView.color3 = newValue}
}
@IBInspectable open var color4: UIColor {
get { return renderer.knobView.color4 }
set {
renderer.knobView.color4 = newValue
renderer.pointerView.color1 = newValue
}
}
@IBInspectable open var highlightColor: UIColor {
get { return renderer.knobView.highlightColor }
set {
renderer.knobView.highlightColor = newValue
renderer.maxiDotView.highlightColor = newValue
renderer.miniDotView.highlightColor = newValue
renderer.textField.layer.shadowColor = newValue.cgColor
renderer.setTextShadow(color: newValue, opacity: 1, offset: CGSize(width: 0.5, height: 0.5), radius: 0)
}
}
@IBInspectable open var knobOuterCircleMultiplier: CGFloat {
get { return renderer.knobView.outerCircleMultiplier }
set {
renderer.knobView.outerCircleMultiplier = newValue
renderer.miniDotView.outerCircleRadius = (bounds.width/2 * newValue)
renderer.maxiDotView.outerCircleRadius = (bounds.width/2 * newValue)
}
}
@IBInspectable open var knobMiddleCircleMultiplier: CGFloat {
get { return renderer.knobView.middleCircleMultiplier }
set {
renderer.knobView.middleCircleMultiplier = newValue
}
}
@IBInspectable open var knobInnerCircleMultiplier: CGFloat {
get { return renderer.knobView.innerCircleMultiplier }
set { renderer.knobView.innerCircleMultiplier = newValue }
}
@IBInspectable open var knobShadowOpacity: Float {
get { return renderer.knobView.shadowOpacity }
set { renderer.knobView.shadowOpacity = newValue }
}
@IBInspectable open var pointerDistanceFromInnerCircleEdge: CGFloat {
get { return renderer.pointerViewDistanceFromEdge }
set { renderer.pointerViewDistanceFromEdge = newValue }
}
@IBInspectable open var pointerSizeMultiplier: CGFloat {
get { return renderer.pointerViewMultiplier }
set { renderer.pointerViewMultiplier = newValue }
}
@IBInspectable open var pointerColor1: UIColor {
get { return renderer.pointerView.color1 }
set { renderer.pointerView.color1 = newValue }
}
@IBInspectable open var pointerColor2: UIColor {
get { return renderer.pointerView.color2 }
set { renderer.pointerView.color2 = newValue }
}
@IBInspectable open var textIsHidden: Bool {
get { return renderer.textFieldIsHidden }
set { renderer.textFieldIsHidden = newValue}
}
@IBInspectable open var textFontSizeMultiplier: CGFloat {
get { return renderer.fontSizeMultiplier }
set { renderer.fontSizeMultiplier = newValue}
}
@IBInspectable open var textColor: UIColor {
get { return renderer.textField.textColor! }
set { renderer.textField.textColor = newValue}
}
@IBInspectable open var maxidotViewIsHidden: Bool {
get { return renderer.maxiDotView.isHidden }
set { renderer.maxiDotView.isHidden = newValue }
}
@IBInspectable open var maxidotOffColor: UIColor {
get { return renderer.maxiDotView.offColor }
set { renderer.maxiDotView.offColor = newValue }
}
@IBInspectable open var maxidotOnColor: UIColor {
get { return renderer.maxiDotView.onColor }
set {
renderer.maxiDotView.onColor = newValue
renderer.knobView.onColor = newValue
//renderer.pointerView.color1 = newValue
}
}
@IBInspectable open var maxidotMaxColor: UIColor {
get { return renderer.maxiDotView.maxColor }
set { renderer.maxiDotView.maxColor = newValue }
}
@IBInspectable open var maxidotCount: Int {
get { return renderer.maxiDotView.maxiDotCount }
set {
let value = newValue % 2 == 0 ? newValue + 1 : newValue
renderer.maxiDotView.maxiDotCount = value
renderer.maxiDotView.reload()
renderer.miniDotView.maxiDotCount = value
renderer.miniDotView.reload()
}
}
@IBInspectable open var maxidotRadiusMultiplier: CGFloat {
get { return renderer.maxiDotView.dotRadiusMultiplier }
set { renderer.maxiDotView.dotRadiusMultiplier = newValue }
}
@IBInspectable open var maxidotInset: CGFloat {
get { return renderer.maxiDotView.dotInset }
set { renderer.maxiDotView.dotInset = newValue }
}
@IBInspectable open var maxidotMaxDotCount: Int {
get { return renderer.maxiDotView.maxDotCount }
set { renderer.maxiDotView.maxDotCount = newValue }
}
@IBInspectable open var minidotViewIsHidden: Bool {
get { return renderer.miniDotView.isHidden }
set { renderer.miniDotView.isHidden = newValue }
}
@IBInspectable open var minidotColor: UIColor {
get { return renderer.miniDotView.offColor }
set { renderer.miniDotView.offColor = newValue }
}
@IBInspectable open var minidotHighlightColor: UIColor {
get { return renderer.miniDotView.highlightColor ?? .white }
set { renderer.miniDotView.highlightColor = newValue }
}
@IBInspectable open var minidotCountPerSegment: Int {
get { return renderer.miniDotView.dotCountPerSegment }
set {
renderer.miniDotView.dotCountPerSegment = newValue
renderer.miniDotView.reload()
}
}
@IBInspectable open var minidotRadiusMultiplier: CGFloat {
get { return renderer.miniDotView.dotRadiusMultiplier }
set { renderer.miniDotView.dotRadiusMultiplier = newValue }
}
@IBInspectable open var minidotInset: CGFloat {
get { return renderer.miniDotView.dotInset }
set { renderer.miniDotView.dotInset = newValue }
}
@IBInspectable open var minidotHideHighlight: Bool {
get { return renderer.miniDotView.highlightColor != nil }
set { renderer.miniDotView.highlightColor = newValue ? highlightColor : nil }
}
@IBInspectable open var minimumValue: CGFloat {
get { return CGFloat(renderer.minimumValue) }
set {
renderer.minimumValue = Float(newValue)
setValue(value, isPercentage: true)
}
}
@IBInspectable open var maximumValue: CGFloat {
get { return CGFloat(renderer.maximumValue) }
set {
renderer.maximumValue = Float(newValue)
setValue(value, isPercentage: true)
}
}
@IBInspectable open var startAngle: CGFloat {
get { return renderer.startAngle.toDegree }
set { renderer.startAngle = newValue.toRadian }
}
@IBInspectable open var endAngle: CGFloat {
get { return renderer.endAngle.toDegree }
set { renderer.endAngle = newValue.toRadian }
}
@IBInspectable open var isClockwise: Bool {
get { return renderer.isClockwise }
set { renderer.isClockwise = newValue }
}
// MARK: - Private Properties
lazy private var renderer = Renderer(with: self)
private var lastTouchAngle: CGFloat = 0
open private (set) var value: Float = 0 // 0 <= value <= 1
private var centerPoint: CGPoint { return CGPoint(x: bounds.midX, y: bounds.midY) }
// MARK: - Functions
override public init(frame: CGRect) {
super.init(frame: frame)
setValue(renderer.minimumValue)
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setValue(renderer.minimumValue)
}
override open func layoutSubviews() {
super.layoutSubviews()
renderer.update(bounds, value: value)
}
// MARK: - Touches
override open func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesBegan(touches, with: event)
guard let location = touches.first?.location(in: self) else { return }
let distanceToOrigin = location - centerPoint
lastTouchAngle = atan2(distanceToOrigin.y, distanceToOrigin.x).toDegree
}
override open func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesMoved(touches, with: event)
guard let location = touches.first?.location(in: self) else { return }
let distanceToOrigin = location - centerPoint
let currentTouchAngle = atan2(distanceToOrigin.y, distanceToOrigin.x).toDegree
let angelDelta = currentTouchAngle - lastTouchAngle // in degree
lastTouchAngle = currentTouchAngle
let angleRange = angleDifferenceInDegree(from: startAngle, to: endAngle, isClockwise: isClockwise)
let angelDeltaAsPercentage = Float(angelDelta / angleRange)
guard abs(angelDeltaAsPercentage) < 1 else { return }
let newValue = isClockwise ? value + angelDeltaAsPercentage : value - angelDeltaAsPercentage
setValue(newValue, isPercentage: true)
}
// MARK: - Public
open func setValue(_ newValue: Float, isPercentage: Bool = false) {
guard maximumValue > minimumValue else {
fatalError("`maximumValue` should be greater then `minimumValue`.")
}
if isPercentage {
value = min(1, max(0, newValue))
} else {
// convert to percentage
let rangedValue = min(renderer.maximumValue, max(renderer.minimumValue, newValue))
value = (rangedValue - renderer.minimumValue) / (renderer.maximumValue - renderer.minimumValue)
}
// updates
renderer.updateText(with: value)
renderer.updatePointerView(in: bounds, value: value)
renderer.maxiDotView.updateColors(using: value)
}
open func setTextFont(named: String, textColor: UIColor, multiplier: CGFloat) {
textFontSizeMultiplier = multiplier
let textSize = bounds.height * multiplier
renderer.setTextFont(named: named, textColor: textColor, textSize: textSize)
}
open func setTextShadow(color: UIColor, opacity: Float = 1, offset: CGSize = CGSize(width: 1, height: 1), radius: CGFloat = 0) {
renderer.setTextShadow(color: color, opacity: opacity, offset: offset, radius: radius)
}
}
class Renderer {
// MARK: - Properties
weak var circularSlider: CircularSlider?
fileprivate let knobView = KnobView(frame: .zero)
fileprivate let pointerView = PointerView(frame: .zero)
fileprivate let textField = UITextField()
fileprivate var miniDotView: DotView!
fileprivate var maxiDotView: DotView!
fileprivate var isClockwise: Bool = true {
didSet {
miniDotView.isClockwise = isClockwise
maxiDotView.isClockwise = isClockwise
}
}
fileprivate var textFieldIsHidden: Bool = false
fileprivate var fontSizeMultiplier: CGFloat = 0.5
fileprivate var pointerViewDistanceFromEdge: CGFloat = 10.0
fileprivate var pointerViewMultiplier: CGFloat = 0.15
fileprivate var startAngle: CGFloat = (.pi/4.0)*3.0 {
didSet {
miniDotView.startAngle = startAngle
maxiDotView.startAngle = startAngle
}
}
fileprivate var endAngle: CGFloat = .pi/4.0 {
didSet {
miniDotView.endAngle = endAngle
maxiDotView.endAngle = endAngle
}
}
fileprivate var minimumValue: Float = 0.0
fileprivate var maximumValue: Float = 100.0
// MARK: - Init
init(with view: CircularSlider) {
self.circularSlider = view
commonInit()
}
func update(_ bounds: CGRect, value: Float) {
updatePointerView(in: bounds, value: value)
updateTextField(in: bounds)
updateDotViews(in: bounds)
}
func setTextFont(named: String, textColor: UIColor, textSize: CGFloat) {
textField.textColor = textColor
textField.font = UIFont(name: named, size: textSize) ?? UIFont.systemFont(ofSize: textSize)
}
func setTextShadow(color: UIColor, opacity: Float = 1, offset: CGSize = CGSize(width: 1, height: 1), radius: CGFloat = 0) {
textField.layer.setShadow(color: color, opacity: opacity, offset: offset, radius: radius)
}
}
// MARK: - Private API
private extension Renderer {
func commonInit() {
addKnobView()
addDotViews()
addPointerView()
addTextField()
}
func addKnobView() {
circularSlider?.addSubview(knobView)
knobView.translatesAutoresizingMaskIntoConstraints = false
let views = ["view": knobView]
let verticalConstraint = NSLayoutConstraint.constraints(withVisualFormat: "V:|[view]|", options: .init(rawValue: 0), metrics: nil, views: views)
let horizontalConstraint = NSLayoutConstraint.constraints(withVisualFormat: "H:|[view]|", options: .init(rawValue: 0), metrics: nil, views: views)
circularSlider?.addConstraints(verticalConstraint + horizontalConstraint)
}
func addPointerView() {
circularSlider?.addSubview(pointerView)
}
func addInputAccessoryView() {
let width = UIScreen.main.bounds.width
let toolBar = UIToolbar(frame: CGRect(origin: .zero, size: CGSize(width: width, height: 48)))
toolBar.barStyle = .blackTranslucent
let flexibleSpace = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
let done = UIBarButtonItem(title: "Done", style: .done, target: self, action: #selector(keyboardDoneButtonTapped))
done.tintColor = .lightGray
toolBar.items = [done, flexibleSpace]
toolBar.sizeToFit()
textField.inputAccessoryView = toolBar
}
func addTextField() {
textField.backgroundColor = .clear
textField.layer.cornerRadius = 3
textField.textAlignment = .center
textField.text = ""
textField.keyboardType = .numberPad
textField.keyboardAppearance = .dark
textField.clearsOnInsertion = true
textField.adjustsFontSizeToFitWidth = true
if let height = circularSlider?.bounds.height {
setTextFont(named: Constants.fontName, textColor: Constants.lightTextColor, textSize: height * fontSizeMultiplier)
}
setTextShadow(color: .white)
addInputAccessoryView()
circularSlider?.addSubview(textField)
}
func addDotViews() {
miniDotView = DotView(type: .mini, startAngle: startAngle, endAngle: endAngle, isClockwise: isClockwise)
circularSlider?.addSubview(miniDotView)
maxiDotView = DotView(type: .maxi, startAngle: startAngle, endAngle: endAngle, isClockwise: isClockwise)
circularSlider?.addSubview(maxiDotView)
}
@objc func keyboardDoneButtonTapped() {
textField.endEditing(true)
guard let circularSlider = circularSlider else { return }
guard let text = textField.text, let newValue = Int(text) else {
updateText(with: circularSlider.value, isPercentage: true)
return
}
circularSlider.setValue(Float(newValue))
maxiDotView.layoutSubviews()
}
// MARK: - Updates
func updateDotViews(in bounds: CGRect) {
let dotViewFrame = CGRect(origin: CGPoint(x: bounds.midX, y: bounds.midY), size: bounds.size)
miniDotView.frame = dotViewFrame
maxiDotView.frame = dotViewFrame
let outerCircleRadius = bounds.width/2 * knobView.outerCircleMultiplier
miniDotView.outerCircleRadius = outerCircleRadius
maxiDotView.outerCircleRadius = outerCircleRadius
}
func updateTextField(in bounds: CGRect) {
let multiplier: CGFloat = max(0.1, min(0.5, fontSizeMultiplier/2))
let width = (bounds.width * knobView.innerCircleMultiplier) * 0.8
let height = (bounds.height * knobView.innerCircleMultiplier) * multiplier
let x = (bounds.width - width)/2
let y = (bounds.height - height)/2
textField.frame = CGRect(x: x, y: y, width: width, height: height)
let name = textField.font?.fontName ?? Constants.fontName
textField.font = UIFont(name: name, size: textField.frame.height)
textField.isHidden = textFieldIsHidden
}
func updateText(with newValue: Float, isPercentage: Bool = true) {
var value = Int(newValue)
if isPercentage {
// convert value (0...1) to a value within proposed range
value = Int(newValue * (maximumValue - minimumValue) + minimumValue)
}
switch value {
case Int(minimumValue): textField.text = "MIN"
case Int(maximumValue): textField.text = "MAX"
default: textField.text = "\(value)"
}
}
func updatePointerView(in bounds: CGRect, value: Float) {
let angleRange = angleDifferenceInDegree(from: startAngle.toDegree, to: endAngle.toDegree, isClockwise: isClockwise)
let angle = isClockwise ? startAngle.toDegree + (angleRange * CGFloat(value)) : startAngle.toDegree - (angleRange * CGFloat(value))
let radius = (bounds.width * knobView.innerCircleMultiplier)/2
let width = radius * pointerViewMultiplier
let adjustX = bounds.midX - width/2
let adjustY = bounds.midY - width/2
let x = cos(angle.toRadian) * (radius - pointerViewDistanceFromEdge - width/2) + adjustX
let y = sin(angle.toRadian) * (radius - pointerViewDistanceFromEdge - width/2) + adjustY
pointerView.frame = CGRect(x: x, y: y, width: width, height: width)
}
}
+99
View File
@@ -0,0 +1,99 @@
//
// DotLayer.swift
// JOCircularSlider
//
// Created by Jalal Ouraigua on 04/12/2018.
// Copyright © 2018 Jalal Ouraigua. All rights reserved.
//
import UIKit
class DotLayer: CALayer {
var color = Constants.dotGrayColor {
didSet {
gradientLayer.colors = [shadowColor ?? color.cgColor, color.cgColor]
frontLayer.fillColor = color.cgColor
}
}
var shadowMultiplier: CGFloat = 0.1
override var shadowColor: CGColor? {
get { return gradientLayer.colors?.first as! CGColor? }
set {
gradientLayer.colors = [newValue ?? color.cgColor, color.cgColor]
}
}
var highlightColor: UIColor? = .white
private let backLayer = CAShapeLayer()
private let frontLayer = CAShapeLayer()
private let gradientLayer = CAGradientLayer()
private let maskLayer = CAShapeLayer()
init(color: UIColor,
shadowColor: UIColor? = UIColor.darkGray.withAlphaComponent(0.5),
shadowMultiplier: CGFloat) {
self.color = color
self.shadowMultiplier = shadowMultiplier
super.init()
needsDisplayOnBoundsChange = true
setupSublayers()
self.shadowColor = shadowColor?.cgColor
}
override init(layer: Any) {
super.init(layer: layer)
setupSublayers()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setupSublayers()
}
private func setupSublayers() {
backLayer.fillColor = color.cgColor
frontLayer.fillColor = color.cgColor
maskLayer.fillColor = nil
maskLayer.strokeColor = color.cgColor
gradientLayer.startPoint = CGPoint(x: 0, y: 0)
gradientLayer.endPoint = CGPoint(x: 0.5, y: 0.5)
gradientLayer.locations = [0, 1]
addSublayer(backLayer)
addSublayer(frontLayer)
addSublayer(maskLayer)
addSublayer(gradientLayer)
gradientLayer.mask = maskLayer
}
override func layoutSublayers() {
super.layoutSublayers()
let path = UIBezierPath(ovalIn: bounds).cgPath
let offset = CGSize(width: bounds.width * shadowMultiplier, height: bounds.height * shadowMultiplier)
backLayer.path = path
//backLayer.setShadow(color: highlightColor, opacity: 1, offset: CGSize(width: offset.width/2, height: offset.height), radius: 0)
backLayer.setShadow(color: highlightColor, opacity: 1, offset: CGSize(width: offset.width, height: offset.height), radius: 0)
frontLayer.path = path
maskLayer.lineWidth = offset.width
maskLayer.path = UIBezierPath(ovalIn: bounds.insetBy(dx: offset.width/2, dy: offset.height/2)).cgPath
gradientLayer.frame = bounds
}
}
+164
View File
@@ -0,0 +1,164 @@
//
// DotView.swift
// JOCircularSlider
//
// Created by Jalal Ouraigua on 04/12/2018.
// Copyright © 2018 Jalal Ouraigua. All rights reserved.
//
import UIKit
class DotView: UIView {
enum DotType {
case mini
case maxi
}
// MARK: - Properties
var type: DotType = .maxi
var isClockwise = true { didSet { reload() }}
var startAngle: CGFloat = (.pi/4.0)*3.0
var endAngle: CGFloat = .pi/4.0
var dotCountPerSegment: Int = 6
var outerCircleRadius: CGFloat? { didSet { reload() }}
lazy var maxDotCount: Int = {
return Int(Float(maxiDotCount) / 5.0) + (maxiDotCount % 5 == 0 ? 0 : 1)
}()
lazy var dotInset: CGFloat = {
return type == .mini ? 10.0 : 15.0
}()
lazy var maxiDotCount: Int = {
return Int(angleRange / (.pi*2.0 / 15.0))
}()
lazy var dotRadiusMultiplier: CGFloat = type == .mini ? 0.22 : 0.09
// Colors
var offColor: UIColor = Constants.dotGrayColor {
didSet { reload() }
}
var onColor: UIColor = Constants.dotBlueColor {
didSet { reload() }
}
var maxColor: UIColor = Constants.dotRedColor {
didSet { reload() }
}
var highlightColor: UIColor? = .white {
didSet { reload() }
}
private var currentIndex: Int = 0
private var value: Float = 0
// MARK: - Init
init(type: DotType, startAngle: CGFloat, endAngle: CGFloat, isClockwise: Bool) {
self.type = type
self.startAngle = startAngle
self.endAngle = endAngle
self.isClockwise = isClockwise
super.init(frame: .zero)
commonInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}
override func layoutSubviews() {
super.layoutSubviews()
guard let sublayers = layer.sublayers else { return }
let radius = outerCircleRadius == nil ? (bounds.width/2) - dotRadius - dotInset : outerCircleRadius! + dotRadius + dotInset
for i in 0..<sublayers.count {
guard let dotLayer = sublayers[i] as? DotLayer else { continue }
if type == .mini && (i % dotCountPerSegment == 0) {
continue
}
let angle = startAngle + ((CGFloat(i) * unitAngle) * (isClockwise ? 1 : -1))
dotLayer.frame = CGRect(x: cos(angle) * radius - dotRadius,
y: sin(angle) * radius - dotRadius,
width: dotRadius * 2,
height: dotRadius * 2)
}
currentIndex = -1
updateColors(using: value)
}
func reload() {
layer.sublayers?.removeAll()
commonInit()
}
func updateColors(using value: Float) {
guard type == .maxi else { return }
let index = Int(value * Float(dotCount - 1))
guard index != currentIndex else { return }
currentIndex = index
self.value = value
guard let sublayers = layer.sublayers else { return }
var hue: CGFloat = 0; var saturation: CGFloat = 0 ; var brightness: CGFloat = 0
onColor.getHue(&hue, saturation: &saturation, brightness: &brightness, alpha: nil)
var j: CGFloat = 0
for i in 0..<sublayers.count {
guard let dotLayer = sublayers[i] as? DotLayer else { continue }
guard i <= currentIndex else { dotLayer.color = offColor; continue }
guard i >= dotCount - maxDotCount else { dotLayer.color = onColor; continue }
let newHue = hue > 0.5 ? hue + (j * ((1.0 - hue)/CGFloat(maxDotCount-1))) : hue - (j * (hue/CGFloat(maxDotCount-1)))
dotLayer.color = UIColor(hue: newHue , saturation: saturation, brightness: brightness, alpha: 1)
j += 1.0
}
}
}
// MARK: Private API
private extension DotView {
var dotCount: Int {
switch type {
case .mini: return (maxiDotCount - 1) * (dotCountPerSegment) + 1
case .maxi: return maxiDotCount
}
}
var dotRadius: CGFloat {
let opposite = sin(unitAngle) * (bounds.width/2)
return opposite/2 * dotRadiusMultiplier
}
var angleRange: CGFloat {
return angleDifferenceInDegree(from: startAngle.toDegree, to: endAngle.toDegree, isClockwise: isClockwise).toRadian
}
var unitAngle: CGFloat {
switch type {
case .mini: return (angleRange / CGFloat(maxiDotCount - 1)) / CGFloat(dotCountPerSegment)
case .maxi: return angleRange / CGFloat(dotCount - 1)
}
}
func commonInit() {
for _ in 0..<dotCount {
var dotLayer: DotLayer
switch type {
case .mini: dotLayer = DotLayer(color: offColor, shadowMultiplier: 0.18)
case .maxi: dotLayer = DotLayer(color: offColor, shadowMultiplier: 0.1)
}
dotLayer.highlightColor = highlightColor
layer.addSublayer(dotLayer)
}
}
}
+55
View File
@@ -0,0 +1,55 @@
//
// Extensions.swift
// JOCircularSlider
//
// Created by Jalal Ouraigua on 04/12/2018.
// Copyright © 2018 Jalal Ouraigua. All rights reserved.
//
import UIKit
public func angleDifferenceInDegree(from start: CGFloat, to end: CGFloat, isClockwise: Bool) -> CGFloat {
if isClockwise {
return start >= end ? 360 - (start - end) : end - start
} else {
return start >= end ? start - end : 360 - (end - start)
}
}
extension FloatingPoint {
public var toRadian: Self { return self * .pi / 180 }
public var toDegree: Self {
let degree = self * 180 / .pi
return degree >= 0 ? degree : 360 + degree
}
}
extension CGPoint {
static func + (lhs: CGPoint, rhs: CGPoint) -> CGPoint {
return CGPoint(x: lhs.x + rhs.y,
y: lhs.y + rhs.y)
}
static func - (lhs: CGPoint, rhs: CGPoint) -> CGPoint {
return CGPoint(x: lhs.x - rhs.y,
y: lhs.y - rhs.y)
}
}
extension CALayer {
func setShadow(color: UIColor?, opacity: Float = 1, offset: CGSize = CGSize(width: 1, height: 1), radius: CGFloat = 0) {
self.shadowColor = color?.cgColor
self.shadowOpacity = opacity
self.shadowOffset = offset
self.shadowRadius = radius
}
func circlePath(with multiplier: CGFloat) -> UIBezierPath {
let multiplier = (1 - max(0, min(multiplier, 1))) / 2.0
return UIBezierPath(ovalIn: bounds.insetBy(dx: bounds.width * multiplier, dy: bounds.height * multiplier))
}
}
+170
View File
@@ -0,0 +1,170 @@
//
// KnobView.swift
// JOCircularSlider
//
// Created by Jalal Ouraigua on 04/12/2018.
// Copyright © 2018 Jalal Ouraigua. All rights reserved.
//
import UIKit
class KnobView: UIView {
// MARK: - Public Properties
var color1: UIColor = Constants.lightColor1 {
didSet {
outerCircleStroke.colors[0] = color1
outerCircle.colors[0] = color1
}
}
var color2: UIColor = Constants.lightColor2 {
didSet {
outerCircle.colors[1] = color2
middleCircle.colors[0] = color2
innerCircle.colors[0] = color2
}
}
var color3: UIColor = Constants.lightColor3 {
didSet { middleCircle.colors[1] = color3 }
}
var color4: UIColor = Constants.lightColor4 {
didSet { innerCircle.colors[1] = color4 }
}
var highlightColor: UIColor = .white {
didSet {
outerCircleStroke.colors[1] = highlightColor
}
}
var onColor: UIColor = Constants.dotBlueColor {
didSet {
glowCircleLayer.colors = [onColor, onColor.withAlphaComponent(0.7)]
}
}
var shadowOpacity: Float = 0.4 {
didSet {
middleCircleShadow.shadowOpacity = shadowOpacity
}
}
var outerCircleMultiplier: CGFloat = Constants.outerMultiplier {
didSet {
guard innerCircleMultiplier < middleCircleMultiplier && middleCircleMultiplier < outerCircleMultiplier else {
fatalError("Values should be: innerCircleMultiplier < middleCircleMultiplier < outerCircleMultiplier.")
}
outerCircleStroke.multiplier = outerCircleMultiplier
outerCircle.multiplier = outerCircleMultiplier
}
}
var middleCircleMultiplier: CGFloat = Constants.middleMultiplier {
didSet {
guard innerCircleMultiplier < middleCircleMultiplier && middleCircleMultiplier < outerCircleMultiplier else {
fatalError("Values should be: innerCircleMultiplier < middleCircleMultiplier < outerCircleMultiplier.")
}
middleCircle.multiplier = middleCircleMultiplier
glowCircleLayer.multiplier = middleCircleMultiplier
middleCircleShadow.path = layer.circlePath(with: middleCircleMultiplier).cgPath
}
}
var innerCircleMultiplier: CGFloat = Constants.innerMultiplier {
didSet {
guard innerCircleMultiplier < middleCircleMultiplier && middleCircleMultiplier < outerCircleMultiplier else {
fatalError("Values should be: innerCircleMultiplier < middleCircleMultiplier < outerCircleMultiplier.")
}
innerCircle.multiplier = innerCircleMultiplier
}
}
// MARK: - Private Properties
private let backgroundLayer: CircularLayer = {
let layer = CircularLayer(colors: [.black, .clear], maskType: .fill)
layer.gradientType = .radial
layer.locations = [0, 0.45]
layer.opacity = 0.5
return layer
}()
lazy private var outerCircleStroke: CircularLayer = {
let layer = CircularLayer(colors: [color1, highlightColor], maskType: .stroke(width: 1.2))
layer.locations = [0.0, 0.4]
layer.multiplier = outerCircleMultiplier
return layer
}()
lazy private var outerCircle: CircularLayer = {
let layer = CircularLayer(colors: [color1, color2], maskType: .fill)
layer.multiplier = outerCircleMultiplier
return layer
}()
lazy private var glowCircleLayer: CircularLayer = {
let layer = CircularLayer(colors: [onColor, onColor], maskType: .stroke(width: 5))
layer.multiplier = middleCircleMultiplier
return layer
}()
lazy private var middleCircleShadow: CAShapeLayer = {
let layer = CAShapeLayer()
layer.setShadow(color: .black, opacity: shadowOpacity, offset: CGSize(width: 2, height: 11), radius: 6)
layer.fillColor = Constants.lightColor3.cgColor
return layer
}()
lazy private var middleCircle: CircularLayer = {
let layer = CircularLayer(colors: [color2, color3], maskType: .fill)
layer.multiplier = middleCircleMultiplier
return layer
}()
lazy private var innerCircle: CircularLayer = {
let layer = CircularLayer(colors: [color2, color4], maskType: .fill)
layer.gradientType = .linear(direction: .topLeftToBottomRight)
layer.multiplier = innerCircleMultiplier
return layer
}()
// MARK: - Init
override init(frame: CGRect) {
super.init(frame: frame)
commonInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
commonInit()
}
override func layoutSubviews() {
super.layoutSubviews()
backgroundLayer.frame = bounds
outerCircleStroke.frame = bounds
outerCircle.frame = bounds
middleCircle.frame = bounds
innerCircle.frame = bounds
middleCircleShadow.path = layer.circlePath(with: middleCircleMultiplier).cgPath
glowCircleLayer.frame = bounds
}
private func commonInit() {
backgroundColor = .clear
layer.addSublayer(backgroundLayer)
layer.insertSublayer(outerCircleStroke, above: backgroundLayer)
layer.insertSublayer(outerCircle, above: outerCircleStroke)
layer.insertSublayer(glowCircleLayer, above: outerCircle)
layer.insertSublayer(middleCircleShadow, above: glowCircleLayer)
layer.insertSublayer(middleCircle, above: middleCircleShadow)
layer.insertSublayer(innerCircle, above: middleCircle)
}
}
@@ -0,0 +1,47 @@
//
// PointerView.swift
// JOCircularSlider
//
// Created by Jalal Ouraigua on 04/12/2018.
// Copyright © 2018 Jalal Ouraigua. All rights reserved.
//
import UIKit
class PointerView: UIView {
// MARK: Public Properties
var color1: UIColor = Constants.lightColor4 {
didSet { setNeedsDisplay() }
}
var color2: UIColor = .white {
didSet { setNeedsDisplay() }
}
// MARK: - Private Properties
private var cgColors: [CGColor] { return [color1.cgColor, color2.cgColor] }
// MARK: -
override func draw(_ rect: CGRect) {
let path = UIBezierPath(ovalIn: rect)
path.addClip()
let colorSpace = CGColorSpaceCreateDeviceRGB()
guard let gradient = CGGradient(colorsSpace: colorSpace, colors: cgColors as CFArray, locations: [0, 1]) else { return }
let context = UIGraphicsGetCurrentContext()!
context.drawLinearGradient(gradient, start: .zero, end: CGPoint(x: 0, y: rect.height), options: [])
}
override func layoutSubviews() {
super.layoutSubviews()
backgroundColor = .clear
}
}
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2018 Jalal Ouraigua <ouraigua@icloud.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+99
View File
@@ -0,0 +1,99 @@
![](https://raw.githubusercontent.com/ouraigua/JOCircularSlider/master/Screenshots/banner.gif)
[![Version](https://img.shields.io/cocoapods/v/JOCircularSlider.svg?style=flat)](https://cocoapods.org/pods/JOCircularSlider)
[![Platform](https://img.shields.io/cocoapods/p/JOCircularSlider.svg?style=flat)](https://cocoapods.org/pods/JOCircularSlider)
[![Language](https://img.shields.io/badge/language-Swift-orange.svg?style=flat)]()
[![License](https://img.shields.io/cocoapods/l/JOCircularSlider.svg?style=flat)](https://cocoapods.org/pods/JOCircularSlider)
[![Twitter: @ouraigua](https://img.shields.io/badge/twitter-@ouraigua-blue.svg?style=flat)](https://twitter.com/ouraigua)
[![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=https://github.com/ouraigua/jocircularslider)](http://clayallsopp.github.io/readme-score?url=https://github.com/ouraigua/jocircularslider)
[![codebeat badge](https://codebeat.co/badges/c4db03f5-903a-4b0e-84bb-98362fc5bd7a)](https://codebeat.co/projects/github-com-ouraigua-jocircularslider-master)
# JOCircularSlider
JOCircularSlider is a highly customisable and reusable iOS circular slider that mimics the behaviour of a knob control.
It uses no preset images and every one of its components is drawn completely in code making it extremely adaptable to every design and theme.
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
![](https://raw.githubusercontent.com/ouraigua/JOCircularSlider/master/Screenshots/shot1.gif)
![](https://raw.githubusercontent.com/ouraigua/JOCircularSlider/master/Screenshots/shot2.gif)
![](https://raw.githubusercontent.com/ouraigua/JOCircularSlider/master/Screenshots/shot3.gif)
## Requirements
- iOS 10.0+
- Xcode 10.0
## Installation
JOCircularSlider is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'JOCircularSlider'
```
## Usage
1. Visually:
```swift
import JOCircularSlider
```
Drag a UIView to your storyboard, change its class of to CircularSlider and start visually customising the design to your liking.
All the parameters are IBInspectable, so you can configure the slider straight from the attribute inspector tab, without having to write a single line of code.
![](https://raw.githubusercontent.com/ouraigua/JOCircularSlider/master/Screenshots/shot4.gif)
2. Programatically:
```swift
import JOCircularSlider
let circularSlider = CircularSlider(frame: aFrame)
circularSlider.startAngle = 230
circularSlider.endAngle = 310
circularSlider.minimumValue = 0
circularSlider.maximumValue = 60
circularSlider.isClockwise = false
```
These are just few of the many params you can configure for the slider.
The slider's `value` property is read-only.
```swift
/**
returns a value in the range 0.0 (minimumValue) to 1.0 (maximumValue).
The default value of this property is 0.0.
*/
open private (set) var value: Float = 0
```
To set the slider's value use the following:
```swift
/**
Set the `value`.
- parameter newValue: if `isPercentage` then new value must be in the range 0.0 to 1.0
- parameter isPercentage: specifies if newValue is in the range [0.0, 1.0] or not
*/
open func setValue(_ newValue: Float, isPercentage: Bool = false)
```
To Control the text's appearance, use these:
```swift
open func setTextFont(named: String, textColor: UIColor, multiplier: CGFloat)
open func setTextShadow(color: UIColor, opacity: Float = 1, offset: CGSize = CGSize(width: 1, height: 1), radius: CGFloat = 0)
```
## References
The project is Inspired by:
- [How To Make a Custom Control Tutorial: A Reusable Knob](https://www.raywenderlich.com/5294-how-to-make-a-custom-control-tutorial-a-reusable-knob)
- [HGCircularSlider](https://github.com/HamzaGhazouani/HGCircularSlider)
## Author
Jalal Ouraigua, ouraigua@icloud.com
## License
JOCircularSlider is available under the MIT license. See the LICENSE file for more info.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

+1
View File
@@ -0,0 +1 @@
Example/Pods/Pods.xcodeproj