Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b98462d32 | |||
| 1b31f26226 | |||
| 511b62e870 | |||
| 83ea6b0f30 | |||
| 355c838a84 | |||
| 5d24b423c0 | |||
| 10ea8fd1cb | |||
| 941c58ff51 |
@@ -0,0 +1,2 @@
|
||||
exclude_patterns:
|
||||
- "Example/"
|
||||
+1
-1
@@ -1 +1 @@
|
||||
ko_fi: hamzaghazouani
|
||||
github: HamzaGhazouani
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<!-- Love HGCircularSlider? Please consider supporting our collective:
|
||||
👉 https://opencollective.com/HGCircularSlider/donate -->
|
||||
<!-- Love HGCircularSlider? please consider sponsoring me so I can continue maintaining and evolving all my projects and new ones. 😄 ✨🏎
|
||||
👉 https://github.com/users/HamzaGhazouani/sponsorship -->
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
# Change Log
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [2.2.0](https://github.com/HamzaGhazouani/HGCircularSlider/releases/tag/2.2.0)
|
||||
* Support Swift 5
|
||||
* Fix the tracking when the value is equal to the max
|
||||
* Add option to stop thumb looping over the min/max value
|
||||
* Add offset thumb option, to draw the thumb inside or outside the circle
|
||||
|
||||
## [2.1.0](https://github.com/HamzaGhazouani/HGCircularSlider/releases/tag/2.1.0)
|
||||
* Support Swift 4.2 version
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ We welcome any type of contribution, not only code. You can help with
|
||||
- **Marketing**: writing blog posts, howto's, printing stickers, ...
|
||||
- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
|
||||
- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
|
||||
- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/HGCircularSlider).
|
||||
|
||||
## Your First Contribution
|
||||
|
||||
@@ -23,45 +22,3 @@ Any code change should be submitted as a pull request. The description should ex
|
||||
|
||||
The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge.
|
||||
It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
|
||||
|
||||
## Financial contributions
|
||||
|
||||
We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/HGCircularSlider).
|
||||
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
|
||||
|
||||
## Questions
|
||||
|
||||
If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!).
|
||||
You can also reach us at hello@HGCircularSlider.opencollective.com.
|
||||
|
||||
## Credits
|
||||
|
||||
### Contributors
|
||||
|
||||
Thank you to all the people who have already contributed to HGCircularSlider!
|
||||
<a href="graphs/contributors"><img src="https://opencollective.com/HGCircularSlider/contributors.svg?width=890" /></a>
|
||||
|
||||
|
||||
### Backers
|
||||
|
||||
Thank you to all our backers! [[Become a backer](https://opencollective.com/HGCircularSlider#backer)]
|
||||
|
||||
<a href="https://opencollective.com/HGCircularSlider#backers" target="_blank"><img src="https://opencollective.com/HGCircularSlider/backers.svg?width=890"></a>
|
||||
|
||||
|
||||
### Sponsors
|
||||
|
||||
Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/HGCircularSlider#sponsor))
|
||||
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/0/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/1/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/2/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/3/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/4/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/5/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/6/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/7/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/8/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/9/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/9/avatar.svg"></a>
|
||||
|
||||
<!-- This `CONTRIBUTING.md` is based on @nayafia's template https://github.com/nayafia/contributing-template -->
|
||||
@@ -19,6 +19,8 @@
|
||||
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
|
||||
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
|
||||
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
|
||||
BB409EA9235C82CE006DC844 /* CircularSliderHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB409EA7235C82CA006DC844 /* CircularSliderHelperTests.swift */; };
|
||||
BB409EAB235C8ACE006DC844 /* CircularSliderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB409EAA235C8ACE006DC844 /* CircularSliderTests.swift */; };
|
||||
BDF84380A076F46A79D0C634 /* Pods_HGCircularSlider_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41A4019E034E0265198683A8 /* Pods_HGCircularSlider_Example.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -55,6 +57,8 @@
|
||||
6C7918EC49141F7F4652E8F1 /* Pods_HGCircularSlider_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HGCircularSlider_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
99A3B0410141275989079EB6 /* Pods-HGCircularSlider_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HGCircularSlider_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-HGCircularSlider_Tests/Pods-HGCircularSlider_Tests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
9BA305BCC009CE17283FE799 /* Pods-HGCircularSlider_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HGCircularSlider_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-HGCircularSlider_Example/Pods-HGCircularSlider_Example.release.xcconfig"; sourceTree = "<group>"; };
|
||||
BB409EA7235C82CA006DC844 /* CircularSliderHelperTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CircularSliderHelperTests.swift; sourceTree = "<group>"; };
|
||||
BB409EAA235C8ACE006DC844 /* CircularSliderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircularSliderTests.swift; sourceTree = "<group>"; };
|
||||
E7D1A678D25EC3365B800DB3 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
|
||||
EEE4816CB037512E066C24A8 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@@ -141,6 +145,8 @@
|
||||
607FACE81AFB9204008FA782 /* Tests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BB409EA7235C82CA006DC844 /* CircularSliderHelperTests.swift */,
|
||||
BB409EAA235C8ACE006DC844 /* CircularSliderTests.swift */,
|
||||
607FACEB1AFB9204008FA782 /* Tests.swift */,
|
||||
607FACE91AFB9204008FA782 /* Supporting Files */,
|
||||
);
|
||||
@@ -356,6 +362,8 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */,
|
||||
BB409EAB235C8ACE006DC844 /* CircularSliderTests.swift in Sources */,
|
||||
BB409EA9235C82CE006DC844 /* CircularSliderHelperTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
+10
-14
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1020"
|
||||
LastUpgradeVersion = "1110"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -41,6 +41,15 @@
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
|
||||
BuildableName = "HGCircularSlider_Example.app"
|
||||
BlueprintName = "HGCircularSlider_Example"
|
||||
ReferencedContainer = "container:HGCircularSlider.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -53,17 +62,6 @@
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
|
||||
BuildableName = "HGCircularSlider_Example.app"
|
||||
BlueprintName = "HGCircularSlider_Example"
|
||||
ReferencedContainer = "container:HGCircularSlider.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -85,8 +83,6 @@
|
||||
ReferencedContainer = "container:HGCircularSlider.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- HGCircularSlider (2.1.0)
|
||||
- HGCircularSlider (2.2.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- HGCircularSlider (from `../`)
|
||||
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
HGCircularSlider: 76cd7ce7b7865d93210bd9e45f53dcab6917f9ad
|
||||
HGCircularSlider: afb1942743a2df156dcc7a3500216e523e14266b
|
||||
|
||||
PODFILE CHECKSUM: 5935efe45bed5ee625cec9162a170ce99849ca5c
|
||||
|
||||
COCOAPODS: 1.7.4
|
||||
COCOAPODS: 1.7.5
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "HGCircularSlider",
|
||||
"version": "2.1.0",
|
||||
"version": "2.2.0",
|
||||
"summary": "Multiple Circular Sliders used to select a value from a continuous range of values.",
|
||||
"swift_versions": "4.2",
|
||||
"swift_versions": "5.0",
|
||||
"description": "Circular Sliders used to select a value from a continuous range of values.\n\nCircularSlider: simple circular slider\nRangeCircularSlider: slider with two points to select a range of values from a continuous range of values\nMidPointCircularSlider: slider with fixed range to select a range of values from a continuois range of values",
|
||||
"homepage": "https://github.com/HamzaGhazouani/HGCircularSlider",
|
||||
"license": {
|
||||
@@ -14,12 +14,12 @@
|
||||
},
|
||||
"source": {
|
||||
"git": "https://github.com/HamzaGhazouani/HGCircularSlider.git",
|
||||
"tag": "2.1.0"
|
||||
"tag": "2.2.0"
|
||||
},
|
||||
"social_media_url": "https://twitter.com/GhazouaniHamza",
|
||||
"platforms": {
|
||||
"ios": "8.0"
|
||||
},
|
||||
"source_files": "HGCircularSlider/Classes/**/*",
|
||||
"swift_version": "4.2"
|
||||
"swift_version": "5.0"
|
||||
}
|
||||
|
||||
Generated
+3
-3
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- HGCircularSlider (2.1.0)
|
||||
- HGCircularSlider (2.2.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- HGCircularSlider (from `../`)
|
||||
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
HGCircularSlider: 76cd7ce7b7865d93210bd9e45f53dcab6917f9ad
|
||||
HGCircularSlider: afb1942743a2df156dcc7a3500216e523e14266b
|
||||
|
||||
PODFILE CHECKSUM: 5935efe45bed5ee625cec9162a170ce99849ca5c
|
||||
|
||||
COCOAPODS: 1.7.4
|
||||
COCOAPODS: 1.7.5
|
||||
|
||||
+66
-71
@@ -326,12 +326,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1100;
|
||||
LastUpgradeCheck = 1020;
|
||||
TargetAttributes = {
|
||||
82EEAE7DB07C6F17150BFE2EAD014CB2 = {
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
};
|
||||
LastUpgradeCheck = 1110;
|
||||
};
|
||||
buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
@@ -488,6 +483,38 @@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
524A721E382C0B078D2BD85C67078D57 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D18BC77130A0F952686F6640607DC850 /* HGCircularSlider.xcconfig */;
|
||||
buildSettings = {
|
||||
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/HGCircularSlider/HGCircularSlider-prefix.pch";
|
||||
INFOPLIST_FILE = "Target Support Files/HGCircularSlider/HGCircularSlider-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MODULEMAP_FILE = "Target Support Files/HGCircularSlider/HGCircularSlider.modulemap";
|
||||
PRODUCT_MODULE_NAME = HGCircularSlider;
|
||||
PRODUCT_NAME = HGCircularSlider;
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
54A6A8BFFD209EFDC1207E2B0A48D497 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = E89E5B545A6604882E250A1E69959933 /* Pods-HGCircularSlider_Tests.debug.xcconfig */;
|
||||
@@ -522,38 +549,6 @@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
7C85042D705C7EFB66554AB88719E931 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D18BC77130A0F952686F6640607DC850 /* HGCircularSlider.xcconfig */;
|
||||
buildSettings = {
|
||||
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/HGCircularSlider/HGCircularSlider-prefix.pch";
|
||||
INFOPLIST_FILE = "Target Support Files/HGCircularSlider/HGCircularSlider-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MODULEMAP_FILE = "Target Support Files/HGCircularSlider/HGCircularSlider.modulemap";
|
||||
PRODUCT_MODULE_NAME = HGCircularSlider;
|
||||
PRODUCT_NAME = HGCircularSlider;
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
80BB2B991ED74EE4BB20A3FAE7A6CED6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = F5D4D0CC167B194D4B1C35D0105DB71E /* Pods-HGCircularSlider_Example.release.xcconfig */;
|
||||
@@ -589,6 +584,37 @@
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
8308D0173A7CA200137C7DB710BE5B3A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D18BC77130A0F952686F6640607DC850 /* HGCircularSlider.xcconfig */;
|
||||
buildSettings = {
|
||||
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/HGCircularSlider/HGCircularSlider-prefix.pch";
|
||||
INFOPLIST_FILE = "Target Support Files/HGCircularSlider/HGCircularSlider-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MODULEMAP_FILE = "Target Support Files/HGCircularSlider/HGCircularSlider.modulemap";
|
||||
PRODUCT_MODULE_NAME = HGCircularSlider;
|
||||
PRODUCT_NAME = HGCircularSlider;
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
911FF10A21E106BF4D9CA1776857B138 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = DA1EA90A0DC940741BB9510A83433F9E /* Pods-HGCircularSlider_Example.debug.xcconfig */;
|
||||
@@ -623,37 +649,6 @@
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
93A9224B86AD25D8BFA3FA1599F9C6FD /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D18BC77130A0F952686F6640607DC850 /* HGCircularSlider.xcconfig */;
|
||||
buildSettings = {
|
||||
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/HGCircularSlider/HGCircularSlider-prefix.pch";
|
||||
INFOPLIST_FILE = "Target Support Files/HGCircularSlider/HGCircularSlider-Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MODULEMAP_FILE = "Target Support Files/HGCircularSlider/HGCircularSlider.modulemap";
|
||||
PRODUCT_MODULE_NAME = HGCircularSlider;
|
||||
PRODUCT_NAME = HGCircularSlider;
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
E473C5FC4D48AC894627CADF422CC1B6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 40A9E1BF9BD7E69EC9050CD12524CA6A /* Pods-HGCircularSlider_Tests.release.xcconfig */;
|
||||
@@ -772,8 +767,8 @@
|
||||
830DCB0A097257D0F9E1D557676CFDE1 /* Build configuration list for PBXNativeTarget "HGCircularSlider" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
93A9224B86AD25D8BFA3FA1599F9C6FD /* Debug */,
|
||||
7C85042D705C7EFB66554AB88719E931 /* Release */,
|
||||
8308D0173A7CA200137C7DB710BE5B3A /* Debug */,
|
||||
524A721E382C0B078D2BD85C67078D57 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.1.0</string>
|
||||
<string>2.2.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@@ -47,4 +47,26 @@ class CircularSliderHelperTests: XCTestCase {
|
||||
let angle = CircularSliderHelper.scaleValue(value, fromInterval: valuesInterval, toInterval: cirlceInterval).toDegrees
|
||||
XCTAssertEqual(angle, 180)
|
||||
}
|
||||
|
||||
func testValueFromRangeToAnotherRangeMinValueEqualToZero() {
|
||||
let oldRange = Interval(min: 0, max: 100)
|
||||
let newRange = Interval(min: 10, max: 20)
|
||||
|
||||
let value: CGFloat = 10
|
||||
|
||||
let newValue = CircularSliderHelper.scaleValue(value, fromInterval: oldRange, toInterval: newRange)
|
||||
|
||||
XCTAssertEqual(newValue, 11)
|
||||
}
|
||||
|
||||
func testValueFromRangeToAnotherRangeMinValueGratherThanZero() {
|
||||
let oldRange = Interval(min: 5, max: 30)
|
||||
let newRange = Interval(min: 0, max: 100)
|
||||
|
||||
let value: CGFloat = 10
|
||||
|
||||
let newValue = CircularSliderHelper.scaleValue(value, fromInterval: oldRange, toInterval: newRange)
|
||||
|
||||
XCTAssertEqual(newValue, 20)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// CircularSliderTests.swift
|
||||
// HGCircularSlider_Tests
|
||||
//
|
||||
// Created by Hamza on 20/10/2019.
|
||||
// Copyright © 2019 CocoaPods. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import HGCircularSlider
|
||||
|
||||
class CircularSliderTests: XCTestCase {
|
||||
|
||||
func testEndPointPositionWithZeroAsInitialValueAnd90DegreesAsTouchPosition() {
|
||||
// Given
|
||||
let circularSlider = CircularSlider(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
|
||||
let startPosition = CGPoint(x: 25, y: 0)
|
||||
circularSlider.minimumValue = 0
|
||||
circularSlider.maximumValue = 100
|
||||
circularSlider.endPointValue = 0
|
||||
|
||||
let touchPosition = CGPoint(x: 50, y: 25)
|
||||
|
||||
// When
|
||||
let newValue = circularSlider.newValue(from: circularSlider.endPointValue, touch: touchPosition, start: startPosition)
|
||||
|
||||
// Then
|
||||
XCTAssertEqual(newValue, 25, accuracy: 0.001)
|
||||
}
|
||||
|
||||
func testEndPointPositionWithValueGratherThanZeroAsInitialValueAnd90DegreesAsTouchPosition() {
|
||||
// Given
|
||||
let circularSlider = CircularSlider(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
|
||||
let startPosition = CGPoint(x: 25, y: 0)
|
||||
circularSlider.minimumValue = 5
|
||||
circularSlider.maximumValue = 25
|
||||
circularSlider.endPointValue = 5
|
||||
|
||||
let touchPosition = CGPoint(x: 50, y: 25)
|
||||
|
||||
// When
|
||||
let newValue = circularSlider.newValue(from: circularSlider.endPointValue, touch: touchPosition, start: startPosition)
|
||||
|
||||
// Then
|
||||
XCTAssertEqual(newValue, 10, accuracy: 0.001)
|
||||
}
|
||||
|
||||
func testndPointPositionWithValueGratherThanZeroAsInitialValueAnd180DegreesAsTouchPosition() {
|
||||
// Given
|
||||
let circularSlider = CircularSlider(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
|
||||
let startPosition = CGPoint(x: 25, y: 0)
|
||||
circularSlider.minimumValue = 5
|
||||
circularSlider.maximumValue = 25
|
||||
circularSlider.endPointValue = 10
|
||||
|
||||
let touchPosition = CGPoint(x: 25, y: 50)
|
||||
|
||||
// When
|
||||
let newValue = circularSlider.newValue(from: circularSlider.endPointValue, touch: touchPosition, start: startPosition)
|
||||
|
||||
// Then
|
||||
XCTAssertEqual(newValue, 15, accuracy: 0.001)
|
||||
}
|
||||
|
||||
func testndPointPositionWithValueGratherThanZeroAsInitialValueAnd270DegreesAsTouchPosition() {
|
||||
// Given
|
||||
let circularSlider = CircularSlider(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
|
||||
let startPosition = CGPoint(x: 25, y: 0)
|
||||
circularSlider.minimumValue = 5
|
||||
circularSlider.maximumValue = 25
|
||||
circularSlider.endPointValue = 10
|
||||
|
||||
let touchPosition = CGPoint(x: 0, y: 25)
|
||||
|
||||
// When
|
||||
let newValue = circularSlider.newValue(from: circularSlider.endPointValue, touch: touchPosition, start: startPosition)
|
||||
|
||||
// Then
|
||||
XCTAssertEqual(newValue, 20, accuracy: 0.001)
|
||||
}
|
||||
|
||||
func testndPointPositionWithValueGratherThanZeroAsInitialValueAnd360DegreesAsTouchPosition() {
|
||||
// Given
|
||||
let circularSlider = CircularSlider(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
|
||||
let startPosition = CGPoint(x: 25, y: 0)
|
||||
circularSlider.minimumValue = 5
|
||||
circularSlider.maximumValue = 25
|
||||
circularSlider.endPointValue = 10
|
||||
|
||||
let touchPosition = CGPoint(x: 24.999, y: 0)
|
||||
|
||||
// When
|
||||
let newValue = circularSlider.newValue(from: circularSlider.endPointValue, touch: touchPosition, start: startPosition)
|
||||
|
||||
// Then
|
||||
XCTAssertEqual(newValue, 25, accuracy: 0.001)
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,10 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
BB692D2E235C9EB300CB74DA /* HGCircularSliderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB692D2D235C9EB300CB74DA /* HGCircularSliderTests.swift */; };
|
||||
BB692D30235C9EB300CB74DA /* HGCircularSlider.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCDBFDDB1E43366F005D6F08 /* HGCircularSlider.framework */; };
|
||||
BB692D37235C9F1100CB74DA /* CircularSliderHelperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB692D36235C9F1100CB74DA /* CircularSliderHelperTests.swift */; };
|
||||
BB692D39235C9F1C00CB74DA /* CircularSliderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB692D38235C9F1C00CB74DA /* CircularSliderTests.swift */; };
|
||||
CCCC96461E9F7FD000999D34 /* MidPointCircularSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCCC96451E9F7FD000999D34 /* MidPointCircularSlider.swift */; };
|
||||
CCDBFDE01E43366F005D6F08 /* HGCircularSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = CCDBFDDE1E43366F005D6F08 /* HGCircularSlider.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
CCDBFDFD1E4336C9005D6F08 /* .gitkeep in Resources */ = {isa = PBXBuildFile; fileRef = CCDBFDF61E4336C9005D6F08 /* .gitkeep */; };
|
||||
@@ -16,7 +20,22 @@
|
||||
CCDBFE021E4336C9005D6F08 /* RangeCircularSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCDBFDFC1E4336C9005D6F08 /* RangeCircularSlider.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
BB692D31235C9EB300CB74DA /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = CCDBFDD21E43366F005D6F08 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = CCDBFDDA1E43366F005D6F08;
|
||||
remoteInfo = HGCircularSlider;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
BB692D2B235C9EB300CB74DA /* HGCircularSliderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HGCircularSliderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BB692D2D235C9EB300CB74DA /* HGCircularSliderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HGCircularSliderTests.swift; sourceTree = "<group>"; };
|
||||
BB692D2F235C9EB300CB74DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
BB692D36235C9F1100CB74DA /* CircularSliderHelperTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CircularSliderHelperTests.swift; path = Example/Tests/CircularSliderHelperTests.swift; sourceTree = SOURCE_ROOT; };
|
||||
BB692D38235C9F1C00CB74DA /* CircularSliderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CircularSliderTests.swift; path = Example/Tests/CircularSliderTests.swift; sourceTree = SOURCE_ROOT; };
|
||||
CCCC96451E9F7FD000999D34 /* MidPointCircularSlider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MidPointCircularSlider.swift; sourceTree = "<group>"; };
|
||||
CCDBFDDB1E43366F005D6F08 /* HGCircularSlider.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HGCircularSlider.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
CCDBFDDE1E43366F005D6F08 /* HGCircularSlider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HGCircularSlider.h; sourceTree = "<group>"; };
|
||||
@@ -29,6 +48,14 @@
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
BB692D28235C9EB300CB74DA /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BB692D30235C9EB300CB74DA /* HGCircularSlider.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
CCDBFDD71E43366F005D6F08 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -39,10 +66,22 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
BB692D2C235C9EB300CB74DA /* HGCircularSliderTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
BB692D36235C9F1100CB74DA /* CircularSliderHelperTests.swift */,
|
||||
BB692D38235C9F1C00CB74DA /* CircularSliderTests.swift */,
|
||||
BB692D2D235C9EB300CB74DA /* HGCircularSliderTests.swift */,
|
||||
BB692D2F235C9EB300CB74DA /* Info.plist */,
|
||||
);
|
||||
path = HGCircularSliderTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CCDBFDD11E43366F005D6F08 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CCDBFDDD1E43366F005D6F08 /* HGCircularSlider */,
|
||||
BB692D2C235C9EB300CB74DA /* HGCircularSliderTests */,
|
||||
CCDBFDDC1E43366F005D6F08 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
@@ -51,6 +90,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CCDBFDDB1E43366F005D6F08 /* HGCircularSlider.framework */,
|
||||
BB692D2B235C9EB300CB74DA /* HGCircularSliderTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -100,6 +140,24 @@
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
BB692D2A235C9EB300CB74DA /* HGCircularSliderTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = BB692D35235C9EB300CB74DA /* Build configuration list for PBXNativeTarget "HGCircularSliderTests" */;
|
||||
buildPhases = (
|
||||
BB692D27235C9EB300CB74DA /* Sources */,
|
||||
BB692D28235C9EB300CB74DA /* Frameworks */,
|
||||
BB692D29235C9EB300CB74DA /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
BB692D32235C9EB300CB74DA /* PBXTargetDependency */,
|
||||
);
|
||||
name = HGCircularSliderTests;
|
||||
productName = HGCircularSliderTests;
|
||||
productReference = BB692D2B235C9EB300CB74DA /* HGCircularSliderTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
CCDBFDDA1E43366F005D6F08 /* HGCircularSlider */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = CCDBFDE31E43366F005D6F08 /* Build configuration list for PBXNativeTarget "HGCircularSlider" */;
|
||||
@@ -124,9 +182,14 @@
|
||||
CCDBFDD21E43366F005D6F08 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1110;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = intive;
|
||||
TargetAttributes = {
|
||||
BB692D2A235C9EB300CB74DA = {
|
||||
CreatedOnToolsVersion = 11.1;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
CCDBFDDA1E43366F005D6F08 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
DevelopmentTeam = R6JBLAQ685;
|
||||
@@ -148,11 +211,19 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
CCDBFDDA1E43366F005D6F08 /* HGCircularSlider */,
|
||||
BB692D2A235C9EB300CB74DA /* HGCircularSliderTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
BB692D29235C9EB300CB74DA /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
CCDBFDD91E43366F005D6F08 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -164,6 +235,16 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
BB692D27235C9EB300CB74DA /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BB692D2E235C9EB300CB74DA /* HGCircularSliderTests.swift in Sources */,
|
||||
BB692D39235C9F1C00CB74DA /* CircularSliderTests.swift in Sources */,
|
||||
BB692D37235C9F1100CB74DA /* CircularSliderHelperTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
CCDBFDD61E43366F005D6F08 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -178,7 +259,56 @@
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
BB692D32235C9EB300CB74DA /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = CCDBFDDA1E43366F005D6F08 /* HGCircularSlider */;
|
||||
targetProxy = BB692D31235C9EB300CB74DA /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
BB692D33235C9EB300CB74DA /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
INFOPLIST_FILE = HGCircularSliderTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.HGCircularSliderTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
BB692D34235C9EB300CB74DA /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
INFOPLIST_FILE = HGCircularSliderTests/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.1;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.github.HGCircularSliderTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
CCDBFDE11E43366F005D6F08 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
@@ -339,6 +469,15 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
BB692D35235C9EB300CB74DA /* Build configuration list for PBXNativeTarget "HGCircularSliderTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
BB692D33235C9EB300CB74DA /* Debug */,
|
||||
BB692D34235C9EB300CB74DA /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
CCDBFDD51E43366F005D6F08 /* Build configuration list for PBXProject "HGCircularSlider" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -28,9 +28,17 @@
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "BB692D2A235C9EB300CB74DA"
|
||||
BuildableName = "HGCircularSliderTests.xctest"
|
||||
BlueprintName = "HGCircularSliderTests"
|
||||
ReferencedContainer = "container:HGCircularSlider.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -51,8 +59,6 @@
|
||||
ReferencedContainer = "container:HGCircularSlider.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
||||
@@ -210,7 +210,7 @@ open class CircularSlider: UIControl {
|
||||
if endPointValue > maximumValue {
|
||||
endPointValue = maximumValue
|
||||
}
|
||||
else if endPointValue < minimumValue {
|
||||
if endPointValue < minimumValue {
|
||||
endPointValue = minimumValue
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ open class CircularSlider: UIControl {
|
||||
let interval = Interval(min: minimumValue, max: maximumValue, rounds: numberOfRounds)
|
||||
let deltaValue = CircularSliderHelper.delta(in: interval, for: angle, oldValue: oldValue)
|
||||
|
||||
var newValue = oldValue + deltaValue
|
||||
var newValue = oldValue + deltaValue - minimumValue
|
||||
let range = maximumValue - minimumValue
|
||||
|
||||
if !stopThumbAtMinMax {
|
||||
@@ -343,7 +343,4 @@ open class CircularSlider: UIControl {
|
||||
|
||||
return newValue
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
//
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
/**
|
||||
A visual control used to select a fixed range of values from a continuous range of values.
|
||||
MidPointCircularSlider use the target-action mechanism to report changes made during the course of editing:
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// HGCircularSliderTests.swift
|
||||
// HGCircularSliderTests
|
||||
//
|
||||
// Created by Hamza on 20/10/2019.
|
||||
// Copyright © 2019 intive. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
class HGCircularSliderTests: XCTestCase {
|
||||
|
||||
override func 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.
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
// This is an example of a functional test case.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
func testPerformanceExample() {
|
||||
// This is an example of a performance test case.
|
||||
measure {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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>$(DEVELOPMENT_LANGUAGE)</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>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,17 @@
|
||||
// swift-tools-version:5.0
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "HGCircularSlider",
|
||||
platforms: [.iOS(.v8)],
|
||||
products: [
|
||||
.library(
|
||||
name: "HGCircularSlider",
|
||||
targets: ["HGCircularSlider"]
|
||||
)
|
||||
],
|
||||
targets: [
|
||||
.target(name: "HGCircularSlider", path: "HGCircularSlider/Classes")
|
||||
]
|
||||
)
|
||||
@@ -115,36 +115,6 @@ The project is Inspired by [UICircularSlider](https://github.com/Zedenem/UICircu
|
||||
|
||||
Hamza Ghazouani, hamza.ghazouani@gmail.com
|
||||
|
||||
## Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
<a href="graphs/contributors"><img src="https://opencollective.com/HGCircularSlider/contributors.svg?width=890" /></a>
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/HGCircularSlider#backer)]
|
||||
|
||||
<a href="https://opencollective.com/HGCircularSlider#backers" target="_blank"><img src="https://opencollective.com/HGCircularSlider/backers.svg?width=890"></a>
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/HGCircularSlider#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/0/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/1/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/2/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/3/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/4/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/5/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/6/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/7/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/8/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/HGCircularSlider/sponsor/9/website" target="_blank"><img src="https://opencollective.com/HGCircularSlider/sponsor/9/avatar.svg"></a>
|
||||
|
||||
|
||||
|
||||
## License
|
||||
|
||||
HGCircularSlider is available under the MIT license. See the LICENSE file for more info.
|
||||
|
||||
Reference in New Issue
Block a user