Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1d5afb0b4e | |||
| 5381878c4d | |||
| 722f2c102d | |||
| b19c7bcff6 | |||
| 7d360e7290 | |||
| 7bbe8ed9a8 | |||
| 7a6d849467 | |||
| 493741de4d | |||
| 4facdfa965 | |||
| 3e25c95374 | |||
| 3c1955c719 | |||
| f9b0e672ba | |||
| ca9bef0296 | |||
| 36ceda5d6f | |||
| 10232aa88e | |||
| c7cbebd88e | |||
| ef8be2c7f2 | |||
| b753840a24 | |||
| 2417a6ca34 | |||
| 2c3aca3a16 | |||
| 8d542bf5eb | |||
| 0bf4f0d7b8 | |||
| a5d1825e62 |
@@ -1,6 +1,14 @@
|
||||
# Change Log
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [2.0.0](https://github.com/HamzaGhazouani/HGCircularSlider/releases/tag/2.0.0)
|
||||
* Added Carthage support
|
||||
* Added number of rounds, allowing to create slider same as Apple bedtime slider (12h clock with two rounds)
|
||||
* Added backtrack inspectable properties, allowing to modify its properties
|
||||
* Added shadow track color and offset inspectable attributes
|
||||
* Removed distance from default slider definition
|
||||
|
||||
|
||||
## [1.1.0](https://github.com/HamzaGhazouani/HGCircularSlider/releases/tag/1.1.0)
|
||||
|
||||
* Fix Swift 3.1 warnings
|
||||
@@ -16,7 +24,7 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.0.1](https://github.com/HamzaGhazouani/HGCircularSlider/releases/tag/1.0.1)
|
||||
|
||||
* remove warnings
|
||||
* remove warnings
|
||||
|
||||
## [1.0.0](https://github.com/HamzaGhazouani/HGCircularSlider/releases/tag/1.0.0)
|
||||
|
||||
@@ -25,7 +33,7 @@ All notable changes to this project will be documented in this file.
|
||||
## [0.1.2](https://github.com/HamzaGhazouani/HGCircularSlider/releases/tag/0.1.2)
|
||||
|
||||
* Add documentation
|
||||
* Last version that support Xcode 7.3.1
|
||||
* Last version that support Xcode 7.3.1
|
||||
|
||||
## [0.1.1](https://github.com/HamzaGhazouani/HGCircularSlider/releases/tag/0.1.1)
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
2DF970E3D7BE7173DEC1D05C /* Pods_HGCircularSlider_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C7918EC49141F7F4652E8F1 /* Pods_HGCircularSlider_Tests.framework */; };
|
||||
3EC27E521EA546F700631582 /* CircularSliderViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC27E511EA546F700631582 /* CircularSliderViewController.swift */; };
|
||||
551FF6F21DD3BFE300BD5B76 /* OtherExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 551FF6F11DD3BFE300BD5B76 /* OtherExampleViewController.swift */; };
|
||||
5539B1B91DD275250038D49D /* PlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5539B1B81DD275250038D49D /* PlayerViewController.swift */; };
|
||||
5539B1BB1DD276C00038D49D /* StrangeZero.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 5539B1BA1DD276C00038D49D /* StrangeZero.mp3 */; };
|
||||
@@ -34,6 +35,7 @@
|
||||
/* Begin PBXFileReference section */
|
||||
04EAC630898381E6412A72E4 /* Pods-HGCircularSlider_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HGCircularSlider_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HGCircularSlider_Example/Pods-HGCircularSlider_Example.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
2A9608AFE40174911E5079C3 /* Pods-HGCircularSlider_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HGCircularSlider_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HGCircularSlider_Tests/Pods-HGCircularSlider_Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
3EC27E511EA546F700631582 /* CircularSliderViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CircularSliderViewController.swift; sourceTree = "<group>"; };
|
||||
41A4019E034E0265198683A8 /* Pods_HGCircularSlider_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_HGCircularSlider_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
47EC1122B43F882A3D3679B7 /* HGCircularSlider.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = HGCircularSlider.podspec; path = ../HGCircularSlider.podspec; sourceTree = "<group>"; };
|
||||
551FF6F11DD3BFE300BD5B76 /* OtherExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OtherExampleViewController.swift; sourceTree = "<group>"; };
|
||||
@@ -113,6 +115,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
607FACD51AFB9204008FA782 /* AppDelegate.swift */,
|
||||
3EC27E511EA546F700631582 /* CircularSliderViewController.swift */,
|
||||
607FACD71AFB9204008FA782 /* ClockViewController.swift */,
|
||||
5539B1B81DD275250038D49D /* PlayerViewController.swift */,
|
||||
551FF6F11DD3BFE300BD5B76 /* OtherExampleViewController.swift */,
|
||||
@@ -227,11 +230,13 @@
|
||||
TargetAttributes = {
|
||||
607FACCF1AFB9204008FA782 = {
|
||||
CreatedOnToolsVersion = 6.3.1;
|
||||
DevelopmentTeam = BKKRU5K7TG;
|
||||
LastSwiftMigration = 0800;
|
||||
ProvisioningStyle = Manual;
|
||||
};
|
||||
607FACE41AFB9204008FA782 = {
|
||||
CreatedOnToolsVersion = 6.3.1;
|
||||
DevelopmentTeam = FP33JJN6C2;
|
||||
LastSwiftMigration = 0800;
|
||||
ProvisioningStyle = Manual;
|
||||
TestTargetID = 607FACCF1AFB9204008FA782;
|
||||
@@ -378,6 +383,7 @@
|
||||
files = (
|
||||
551FF6F21DD3BFE300BD5B76 /* OtherExampleViewController.swift in Sources */,
|
||||
607FACD81AFB9204008FA782 /* ClockViewController.swift in Sources */,
|
||||
3EC27E521EA546F700631582 /* CircularSliderViewController.swift in Sources */,
|
||||
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */,
|
||||
5539B1B91DD275250038D49D /* PlayerViewController.swift in Sources */,
|
||||
55CE65391DD3D32100B0C2B2 /* OClockViewController.swift in Sources */,
|
||||
@@ -511,13 +517,17 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 04EAC630898381E6412A72E4 /* Pods-HGCircularSlider_Example.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
DEVELOPMENT_TEAM = BKKRU5K7TG;
|
||||
INFOPLIST_FILE = HGCircularSlider/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MODULE_NAME = ExampleApp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.cocoapods.HGCircularSlider-Example";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.onmobile.HGCircularSlider-Example";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "979b7b1f-969d-43fe-82ea-a1cc58ec7aab";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "OM-Ent Generic Universal Distribution";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
@@ -526,13 +536,16 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9BA305BCC009CE17283FE799 /* Pods-HGCircularSlider_Example.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = HGCircularSlider/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MODULE_NAME = ExampleApp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.cocoapods.HGCircularSlider-Example";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.onmobile.HGCircularSlider-Example";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
@@ -541,6 +554,8 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 2A9608AFE40174911E5079C3 /* Pods-HGCircularSlider_Tests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = FP33JJN6C2;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
@@ -553,7 +568,9 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HGCircularSlider_Example.app/HGCircularSlider_Example";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -561,6 +578,8 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 99A3B0410141275989079EB6 /* Pods-HGCircularSlider_Tests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||
"$(inherited)",
|
||||
@@ -569,7 +588,9 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HGCircularSlider_Example.app/HGCircularSlider_Example";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="sp2-vV-rZV">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="sp2-vV-rZV">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12086"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
@@ -20,15 +23,20 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="dyk-gn-E0m">
|
||||
<rect key="frame" x="26" y="76" width="323" height="57"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="116" placeholderIntrinsicHeight="57" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="DG9-tl-Yx0" userLabel="BedTime Stack View">
|
||||
<rect key="frame" x="0.0" y="0.0" width="154" height="57"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="YwR-eO-oZe">
|
||||
<rect key="frame" x="28.5" y="0.0" width="97" height="24"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="17" placeholderIntrinsicHeight="24" image="ic_bedtime" translatesAutoresizingMaskIntoConstraints="NO" id="KC4-Yz-4tg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="17" height="24"/>
|
||||
<color key="tintColor" red="1" green="0.65098039220000004" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="75" placeholderIntrinsicHeight="24" text="Bedtime" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JV5-mg-K6N">
|
||||
<rect key="frame" x="22" y="0.0" width="75" height="24"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="18"/>
|
||||
<color key="textColor" red="1" green="0.65098039215686276" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -36,6 +44,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="108" placeholderIntrinsicHeight="33" text="12:00 AM" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ode-Tz-DNv">
|
||||
<rect key="frame" x="23" y="24" width="108" height="33"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="25"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -43,11 +52,16 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="116" placeholderIntrinsicHeight="57" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="pua-bm-FEt" userLabel="Wake Stack View">
|
||||
<rect key="frame" x="169" y="0.0" width="154" height="57"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="GT6-Lu-cLO">
|
||||
<rect key="frame" x="28.5" y="0.0" width="97" height="24"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="17" placeholderIntrinsicHeight="24" image="ic_wake" translatesAutoresizingMaskIntoConstraints="NO" id="yHs-NA-gtj"/>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="17" placeholderIntrinsicHeight="24" image="ic_wake" translatesAutoresizingMaskIntoConstraints="NO" id="yHs-NA-gtj">
|
||||
<rect key="frame" x="0.0" y="0.0" width="17" height="24"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="75" placeholderIntrinsicHeight="24" text="Wake" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0hP-PD-D5h">
|
||||
<rect key="frame" x="22" y="0.0" width="75" height="24"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="18"/>
|
||||
<color key="textColor" red="0.99215686270000003" green="0.75294117650000003" blue="0.035294117649999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -55,6 +69,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="115" placeholderIntrinsicHeight="33" text="12:00 PM" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lh9-bX-Mdn">
|
||||
<rect key="frame" x="19.5" y="24" width="115" height="33"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="27"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -64,9 +79,22 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B7k-gj-MGd" customClass="RangeCircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="27.5" y="149" width="320" height="320"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Hours" translatesAutoresizingMaskIntoConstraints="NO" id="MZM-ia-laW">
|
||||
<rect key="frame" x="65" y="65" width="190" height="190"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="MZM-ia-laW" secondAttribute="height" multiplier="1:1" id="Sa8-Wq-bG0"/>
|
||||
<constraint firstAttribute="width" constant="190" id="oYT-wT-0kd"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="B7k-gj-MGd" secondAttribute="height" id="NVA-rO-PLq"/>
|
||||
<constraint firstItem="MZM-ia-laW" firstAttribute="centerY" secondItem="B7k-gj-MGd" secondAttribute="centerY" id="8Kc-iN-j4o"/>
|
||||
<constraint firstAttribute="width" secondItem="B7k-gj-MGd" secondAttribute="height" id="Q58-Rs-yGZ"/>
|
||||
<constraint firstAttribute="width" constant="320" id="b7b-at-v9d"/>
|
||||
<constraint firstItem="MZM-ia-laW" firstAttribute="centerX" secondItem="B7k-gj-MGd" secondAttribute="centerX" id="xLC-da-bQb"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="lineWidth">
|
||||
@@ -84,12 +112,19 @@
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="trackColor">
|
||||
<color key="value" red="1" green="1" blue="1" alpha="0.10000000000000001" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="backtrackLineWidth">
|
||||
<real key="value" value="40"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="numberOfRounds">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="updateTexts:" destination="CT4-vj-wFA" eventType="valueChanged" id="O1n-wh-9uS"/>
|
||||
</connections>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0:41" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Yn-91-Eq6">
|
||||
<rect key="frame" x="146.5" y="281.5" width="82" height="55"/>
|
||||
<fontDescription key="fontDescription" name="AvenirNext-Regular" family="Avenir Next" pointSize="40"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -98,14 +133,13 @@
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="B7k-gj-MGd" firstAttribute="centerX" secondItem="4jd-aQ-SwJ" secondAttribute="centerX" id="A2F-1K-8e3"/>
|
||||
<constraint firstItem="dyk-gn-E0m" firstAttribute="leading" secondItem="4jd-aQ-SwJ" secondAttribute="leadingMargin" constant="10" id="Dl0-lI-EH6"/>
|
||||
<constraint firstItem="B7k-gj-MGd" firstAttribute="leading" secondItem="4jd-aQ-SwJ" secondAttribute="leadingMargin" id="Jac-u5-3tf"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="dyk-gn-E0m" secondAttribute="trailing" constant="10" id="N5U-c7-Tfy"/>
|
||||
<constraint firstItem="2Yn-91-Eq6" firstAttribute="centerX" secondItem="B7k-gj-MGd" secondAttribute="centerX" id="NhB-HJ-CVg"/>
|
||||
<constraint firstItem="B7k-gj-MGd" firstAttribute="centerY" secondItem="4jd-aQ-SwJ" secondAttribute="centerY" id="PL4-sy-Mdd"/>
|
||||
<constraint firstItem="2Yn-91-Eq6" firstAttribute="centerY" secondItem="B7k-gj-MGd" secondAttribute="centerY" id="WEA-Mb-rJ7"/>
|
||||
<constraint firstItem="B7k-gj-MGd" firstAttribute="top" secondItem="dyk-gn-E0m" secondAttribute="bottom" constant="16" id="laA-G1-dtg"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="B7k-gj-MGd" secondAttribute="trailing" id="xTa-q5-KzN"/>
|
||||
<constraint firstItem="2Yn-91-Eq6" firstAttribute="centerY" secondItem="B7k-gj-MGd" secondAttribute="centerY" id="OM2-lB-fj3"/>
|
||||
<constraint firstItem="2Yn-91-Eq6" firstAttribute="centerX" secondItem="B7k-gj-MGd" secondAttribute="centerX" id="VWY-Ky-HzA"/>
|
||||
<constraint firstItem="B7k-gj-MGd" firstAttribute="centerY" secondItem="4jd-aQ-SwJ" secondAttribute="centerY" id="YFL-7T-X0H"/>
|
||||
<constraint firstItem="B7k-gj-MGd" firstAttribute="top" secondItem="dyk-gn-E0m" secondAttribute="bottom" constant="16" id="wTi-nq-Asd"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" top="YES"/>
|
||||
@@ -120,7 +154,7 @@
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="IfT-Jw-FAY" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-1254" y="2468"/>
|
||||
<point key="canvasLocation" x="-1254.5" y="2467.5"/>
|
||||
</scene>
|
||||
<!--Tab Bar Controller-->
|
||||
<scene sceneID="M9S-pb-Waq">
|
||||
@@ -138,11 +172,12 @@
|
||||
<segue destination="tLb-gm-5PK" kind="relationship" relationship="viewControllers" id="hBp-Fm-sNJ"/>
|
||||
<segue destination="Npo-RV-git" kind="relationship" relationship="viewControllers" id="DMS-53-eB9"/>
|
||||
<segue destination="fOf-1m-bg4" kind="relationship" relationship="viewControllers" id="5Ik-om-DOr"/>
|
||||
<segue destination="814-W4-dSU" kind="relationship" relationship="viewControllers" id="xpY-bZ-bvy"/>
|
||||
</connections>
|
||||
</tabBarController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="gDj-DB-klF" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-562" y="1626"/>
|
||||
<point key="canvasLocation" x="-327" y="1633"/>
|
||||
</scene>
|
||||
<!--Player-->
|
||||
<scene sceneID="90r-0D-nKE">
|
||||
@@ -157,8 +192,10 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="c7m-F5-dgq">
|
||||
<rect key="frame" x="40" y="109" width="295" height="400"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x2l-Xh-2MZ" customClass="CircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="0.0" y="0.0" width="295" height="295"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="x2l-Xh-2MZ" secondAttribute="height" priority="999" id="5ZH-Qv-URo"/>
|
||||
@@ -194,13 +231,16 @@
|
||||
</connections>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="ynQ-4R-F24">
|
||||
<rect key="frame" x="0.0" y="315" width="295" height="37"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="240" placeholderIntrinsicHeight="17" text="StrangeZero" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cRt-q4-UdR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="295" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="14"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="240" placeholderIntrinsicHeight="20" text="Burnin Star" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uAk-aN-SL3">
|
||||
<rect key="frame" x="0.0" y="17" width="295" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -208,6 +248,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="9nw-2D-CbD">
|
||||
<rect key="frame" x="0.0" y="372" width="295" height="29"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="28" id="Tdt-J7-hiZ"/>
|
||||
</constraints>
|
||||
@@ -222,6 +263,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="167" placeholderIntrinsicHeight="48" text="0:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="V2j-gL-XgV">
|
||||
<rect key="frame" x="104" y="232.5" width="167" height="48"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="40"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -263,6 +305,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P7G-Iv-4Jm" customClass="MidPointCircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="73.5" y="195" width="228" height="228"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="228" id="Kx9-Mg-DfE"/>
|
||||
@@ -302,6 +345,7 @@
|
||||
</connections>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="April" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cfm-Db-wi2">
|
||||
<rect key="frame" x="112.5" y="234" width="150" height="150"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="150" id="LDb-AT-qTm"/>
|
||||
<constraint firstAttribute="width" secondItem="Cfm-Db-wi2" secondAttribute="height" id="sh3-2g-Wm9"/>
|
||||
@@ -353,8 +397,10 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="WRY-kB-aj8">
|
||||
<rect key="frame" x="127.5" y="20" width="120" height="138.5"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="19A-pG-3td">
|
||||
<rect key="frame" x="0.0" y="55.5" width="120" height="29"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="120" id="3jN-4n-QeQ"/>
|
||||
</constraints>
|
||||
@@ -370,30 +416,37 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="time_indicators" translatesAutoresizingMaskIntoConstraints="NO" id="iV1-rk-1SV">
|
||||
<rect key="frame" x="37" y="158.5" width="301" height="301"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="iV1-rk-1SV" secondAttribute="height" id="L3y-vK-lUp"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="Hes-2U-VeA">
|
||||
<rect key="frame" x="127.5" y="229.5" width="120" height="159"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="92" placeholderIntrinsicHeight="53" text="AM" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Jhh-41-cud">
|
||||
<rect key="frame" x="0.0" y="0.0" width="120" height="53"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="16"/>
|
||||
<color key="textColor" red="0.87450980392156863" green="0.80000000000000004" blue="0.22352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="43q-ax-2ig">
|
||||
<rect key="frame" x="0.0" y="53" width="120" height="53"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="54" placeholderIntrinsicHeight="53" text="06" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hbF-TF-3lB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="54" height="53"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="44"/>
|
||||
<color key="textColor" red="0.87450980392156863" green="0.80000000000000004" blue="0.22352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="12" placeholderIntrinsicHeight="53" text=":" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vth-jB-JLd">
|
||||
<rect key="frame" x="54" y="0.0" width="12" height="53"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="44"/>
|
||||
<color key="textColor" red="0.87450980389999999" green="0.80000000000000004" blue="0.22352941179999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="54" placeholderIntrinsicHeight="53" text="35" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t63-gB-ld3">
|
||||
<rect key="frame" x="66" y="0.0" width="54" height="53"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="44"/>
|
||||
<color key="textColor" red="0.87450980389999999" green="0.80000000000000004" blue="0.22352941179999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -401,6 +454,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="92" placeholderIntrinsicHeight="53" text="MONDAY" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="F6O-w8-ufI">
|
||||
<rect key="frame" x="0.0" y="106" width="120" height="53"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="16"/>
|
||||
<color key="textColor" red="0.87450980392156863" green="0.80000000000000004" blue="0.22352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -408,6 +462,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kWD-6U-Cha" customClass="CircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="57" y="178.5" width="261" height="261"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="diskFillColor">
|
||||
@@ -440,6 +495,7 @@
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XLN-xb-Www" customClass="CircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="82" y="203.5" width="211" height="211"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="diskFillColor">
|
||||
@@ -472,15 +528,19 @@
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="mzf-rC-Kpg">
|
||||
<rect key="frame" x="121.5" y="459.5" width="132" height="158.5"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="i8l-FT-Qb1">
|
||||
<rect key="frame" x="0.0" y="59.5" width="132" height="40"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="132" placeholderIntrinsicHeight="20" text="PARIS, FRANCE" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DSP-Eq-0z0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="132" height="20"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" red="0.99215686270000003" green="0.75294117650000003" blue="0.035294117649999998" alpha="0.61616379310344827" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="132" placeholderIntrinsicHeight="20" text="November 9, 2016" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="f3J-m0-6t0">
|
||||
<rect key="frame" x="0.0" y="20" width="132" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="16"/>
|
||||
<color key="textColor" red="0.99215686270000003" green="0.75294117650000003" blue="0.035294117649999998" alpha="0.61616379310344827" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -526,8 +586,161 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="148" y="2468"/>
|
||||
</scene>
|
||||
<!--Circular-->
|
||||
<scene sceneID="EVO-nS-JTv">
|
||||
<objects>
|
||||
<viewController id="814-W4-dSU" customClass="CircularSliderViewController" customModule="HGCircularSlider_Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="hfr-Sy-sxA"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="Rnp-Hd-bq6"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="KW8-2q-ueG">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0zL-f3-x42" customClass="CircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="46" y="152" width="283" height="283"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rounds" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eTZ-Q0-WV1">
|
||||
<rect key="frame" x="111" y="131.5" width="62" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
|
||||
<color key="textColor" red="0.1843137255" green="0.21960784310000001" blue="0.53725490200000003" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="eTZ-Q0-WV1" firstAttribute="centerX" secondItem="0zL-f3-x42" secondAttribute="centerX" id="3kp-PR-wHt"/>
|
||||
<constraint firstAttribute="width" secondItem="0zL-f3-x42" secondAttribute="height" id="HkE-2f-Rux"/>
|
||||
<constraint firstItem="eTZ-Q0-WV1" firstAttribute="centerY" secondItem="0zL-f3-x42" secondAttribute="centerY" id="MHd-ka-yGm"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="minimumValue">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="maximumValue">
|
||||
<real key="value" value="30"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="numberOfRounds">
|
||||
<integer key="value" value="3"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="trackFillColor">
|
||||
<color key="value" red="0.1843137255" green="0.21960784310000001" blue="0.53725490200000003" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="backtrackLineWidth">
|
||||
<real key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="lineWidth">
|
||||
<real key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="endThumbTintColor">
|
||||
<color key="value" red="0.1843137255" green="0.21960784310000001" blue="0.53725490200000003" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="endThumbStrokeHighlightedColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="endThumbStrokeColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="trackColor">
|
||||
<color key="value" red="0.67450980392156867" green="0.18823529411764706" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="diskFillColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="diskColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="KXq-jq-I0O">
|
||||
<rect key="frame" x="46" y="465" width="283" height="72"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="Gjj-Jf-WgG">
|
||||
<rect key="frame" x="0.0" y="0.0" width="283" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Max:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eBm-NY-JEJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="141.5" height="24"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/>
|
||||
<color key="textColor" red="0.96862745100000003" green="0.20000000000000001" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Max:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w0T-zs-UVB">
|
||||
<rect key="frame" x="141.5" y="0.0" width="141.5" height="24"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/>
|
||||
<color key="textColor" red="0.96862745100000003" green="0.20000000000000001" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="pb0-fu-6bN">
|
||||
<rect key="frame" x="0.0" y="24" width="283" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Min:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="czd-zb-da5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="141.5" height="24"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/>
|
||||
<color key="textColor" red="0.96862745100000003" green="0.20000000000000001" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Max:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yAC-yJ-TQy">
|
||||
<rect key="frame" x="141.5" y="0.0" width="141.5" height="24"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/>
|
||||
<color key="textColor" red="0.96862745100000003" green="0.20000000000000001" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="EWO-WK-y5L">
|
||||
<rect key="frame" x="0.0" y="48" width="283" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Current:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mgG-23-eqg">
|
||||
<rect key="frame" x="0.0" y="0.0" width="141.5" height="24"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/>
|
||||
<color key="textColor" red="0.96862745100000003" green="0.20000000000000001" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Max:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wSQ-ek-rPk">
|
||||
<rect key="frame" x="141.5" y="0.0" width="141.5" height="24"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/>
|
||||
<color key="textColor" red="0.96862745100000003" green="0.20000000000000001" blue="0.41960784309999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="pb0-fu-6bN" firstAttribute="width" secondItem="KXq-jq-I0O" secondAttribute="width" id="5nP-oz-5CM"/>
|
||||
<constraint firstItem="EWO-WK-y5L" firstAttribute="width" secondItem="KXq-jq-I0O" secondAttribute="width" id="Oas-IE-BF6"/>
|
||||
<constraint firstItem="Gjj-Jf-WgG" firstAttribute="width" secondItem="KXq-jq-I0O" secondAttribute="width" id="fjw-BV-kb9"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.047058823529411764" green="0.062745098039215685" blue="0.15294117647058825" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="KXq-jq-I0O" firstAttribute="top" secondItem="0zL-f3-x42" secondAttribute="bottom" constant="30" id="8wl-ME-jX4"/>
|
||||
<constraint firstItem="0zL-f3-x42" firstAttribute="centerY" secondItem="KW8-2q-ueG" secondAttribute="centerY" constant="-40" id="Gbk-P7-1Fg"/>
|
||||
<constraint firstItem="0zL-f3-x42" firstAttribute="leading" secondItem="KW8-2q-ueG" secondAttribute="leadingMargin" constant="30" id="Hzp-R2-8yv"/>
|
||||
<constraint firstItem="KXq-jq-I0O" firstAttribute="leading" secondItem="KW8-2q-ueG" secondAttribute="leadingMargin" constant="30" id="pva-PJ-3WQ"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="KXq-jq-I0O" secondAttribute="trailing" constant="30" id="tAt-Zk-a5O"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="0zL-f3-x42" secondAttribute="trailing" constant="30" id="u6c-7J-sLh"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<tabBarItem key="tabBarItem" title="Circular" image="second" id="Dl9-Du-JZD"/>
|
||||
<connections>
|
||||
<outlet property="circularSlider" destination="0zL-f3-x42" id="aXt-kT-xjs"/>
|
||||
<outlet property="currentValueLabel" destination="wSQ-ek-rPk" id="QxR-IO-sEq"/>
|
||||
<outlet property="maxValueLabel" destination="w0T-zs-UVB" id="PYO-EN-sup"/>
|
||||
<outlet property="minValueLabel" destination="yAC-yJ-TQy" id="L0J-SX-Hur"/>
|
||||
<outlet property="roundsLabel" destination="eTZ-Q0-WV1" id="j6R-d5-rq2"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="ijD-qf-fmt" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="643" y="2468"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="Hours" width="219" height="219"/>
|
||||
<image name="first" width="30" height="30"/>
|
||||
<image name="ic_bedtime" width="17" height="19"/>
|
||||
<image name="ic_wake" width="13" height="16"/>
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// CircularSliderViewController.swift
|
||||
// HGCircularSlider
|
||||
//
|
||||
// Created by Hamza Ghazouani on 16/04/2017.
|
||||
// Copyright © 2017 CocoaPods. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Foundation
|
||||
import HGCircularSlider
|
||||
|
||||
class CircularSliderViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var circularSlider: CircularSlider!
|
||||
@IBOutlet weak var roundsLabel: UILabel!
|
||||
@IBOutlet weak var maxValueLabel: UILabel!
|
||||
@IBOutlet weak var minValueLabel: UILabel!
|
||||
@IBOutlet weak var currentValueLabel: UILabel!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
circularSlider.endPointValue = 1
|
||||
updateTexts()
|
||||
circularSlider.addTarget(self, action: #selector(updateTexts), for: .valueChanged)
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
super.didReceiveMemoryWarning()
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
func updateTexts() {
|
||||
let value = circularSlider.endPointValue
|
||||
let ok = (circularSlider.maximumValue / CGFloat(circularSlider.numberOfRounds))
|
||||
let ff = ceil(value / ok)
|
||||
|
||||
maxValueLabel.text = String(format: "%.0f", circularSlider.maximumValue)
|
||||
minValueLabel.text = String(format: "%.0f", circularSlider.minimumValue)
|
||||
|
||||
currentValueLabel.text = String(format: "%.0f", value)
|
||||
roundsLabel.text = "Round N° " + String(format: "%.0f", ff)
|
||||
}
|
||||
|
||||
/*
|
||||
// MARK: - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
||||
// Get the new view controller using segue.destinationViewController.
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -15,11 +15,12 @@ extension Date {
|
||||
|
||||
class ClockViewController: UIViewController {
|
||||
|
||||
|
||||
|
||||
@IBOutlet weak var durationLabel: UILabel!
|
||||
@IBOutlet weak var bedtimeLabel: UILabel!
|
||||
@IBOutlet weak var wakeLabel: UILabel!
|
||||
@IBOutlet weak var rangeCircularSlider: RangeCircularSlider!
|
||||
@IBOutlet weak var clockFormatSegmentedControl: UISegmentedControl!
|
||||
|
||||
lazy var dateFormatter: DateFormatter = {
|
||||
let dateFormatter = DateFormatter()
|
||||
@@ -51,6 +52,11 @@ class ClockViewController: UIViewController {
|
||||
}
|
||||
|
||||
@IBAction func updateTexts(_ sender: AnyObject) {
|
||||
|
||||
adjustValue(value: &rangeCircularSlider.startPointValue)
|
||||
adjustValue(value: &rangeCircularSlider.endPointValue)
|
||||
|
||||
|
||||
let bedtime = TimeInterval(rangeCircularSlider.startPointValue)
|
||||
let bedtimeDate = Date(timeIntervalSinceReferenceDate: bedtime)
|
||||
bedtimeLabel.text = dateFormatter.string(from: bedtimeDate)
|
||||
@@ -65,5 +71,12 @@ class ClockViewController: UIViewController {
|
||||
durationLabel.text = dateFormatter.string(from: durationDate)
|
||||
dateFormatter.dateFormat = "hh:mm a"
|
||||
}
|
||||
|
||||
func adjustValue(value: inout CGFloat) {
|
||||
let minutes = value / 60
|
||||
let adjustedMinutes = ceil(minutes / 5.0) * 5
|
||||
value = adjustedMinutes * 60
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "Hours.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- HGCircularSlider (1.0.2)
|
||||
- HGCircularSlider (2.1.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- HGCircularSlider (from `../`)
|
||||
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
|
||||
:path: ../
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
HGCircularSlider: e7ded3c342cf180d2b751a444aeb603c61b1f3fd
|
||||
HGCircularSlider: ed0948eab581b6371d0b647051fe538e60741cc4
|
||||
|
||||
PODFILE CHECKSUM: 7cb4c64ce59896052589f93ba9b0ea50a207f738
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "HGCircularSlider",
|
||||
"version": "1.0.2",
|
||||
"version": "2.1.0",
|
||||
"summary": "Multiple Circular Sliders used to select a value from a continuous range of values.",
|
||||
"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",
|
||||
@@ -13,7 +13,7 @@
|
||||
},
|
||||
"source": {
|
||||
"git": "https://github.com/HamzaGhazouani/HGCircularSlider.git",
|
||||
"tag": "1.0.2"
|
||||
"tag": "2.1.0"
|
||||
},
|
||||
"social_media_url": "https://twitter.com/GhazouaniHamza",
|
||||
"platforms": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- HGCircularSlider (1.0.2)
|
||||
- HGCircularSlider (2.1.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- HGCircularSlider (from `../`)
|
||||
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
|
||||
:path: ../
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
HGCircularSlider: e7ded3c342cf180d2b751a444aeb603c61b1f3fd
|
||||
HGCircularSlider: ed0948eab581b6371d0b647051fe538e60741cc4
|
||||
|
||||
PODFILE CHECKSUM: 7cb4c64ce59896052589f93ba9b0ea50a207f738
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.2</string>
|
||||
<string>2.1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'HGCircularSlider'
|
||||
s.version = '1.1.0'
|
||||
s.version = '2.0.0'
|
||||
s.summary = 'Multiple Circular Sliders used to select a value from a continuous range of values.'
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ s.social_media_url = 'https://twitter.com/GhazouaniHamza'
|
||||
s.ios.deployment_target = '8.0'
|
||||
|
||||
s.source_files = 'HGCircularSlider/Classes/**/*'
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -0,0 +1,344 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
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 */; };
|
||||
CCDBFDFF1E4336C9005D6F08 /* CircularSlider+Draw.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCDBFDF91E4336C9005D6F08 /* CircularSlider+Draw.swift */; };
|
||||
CCDBFE001E4336C9005D6F08 /* CircularSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCDBFDFA1E4336C9005D6F08 /* CircularSlider.swift */; };
|
||||
CCDBFE011E4336C9005D6F08 /* CircularSliderHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCDBFDFB1E4336C9005D6F08 /* CircularSliderHelper.swift */; };
|
||||
CCDBFE021E4336C9005D6F08 /* RangeCircularSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCDBFDFC1E4336C9005D6F08 /* RangeCircularSlider.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
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>"; };
|
||||
CCDBFDDF1E43366F005D6F08 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
CCDBFDF61E4336C9005D6F08 /* .gitkeep */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
|
||||
CCDBFDF91E4336C9005D6F08 /* CircularSlider+Draw.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CircularSlider+Draw.swift"; sourceTree = "<group>"; };
|
||||
CCDBFDFA1E4336C9005D6F08 /* CircularSlider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CircularSlider.swift; sourceTree = "<group>"; };
|
||||
CCDBFDFB1E4336C9005D6F08 /* CircularSliderHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CircularSliderHelper.swift; sourceTree = "<group>"; };
|
||||
CCDBFDFC1E4336C9005D6F08 /* RangeCircularSlider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RangeCircularSlider.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
CCDBFDD71E43366F005D6F08 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
CCDBFDD11E43366F005D6F08 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CCDBFDDD1E43366F005D6F08 /* HGCircularSlider */,
|
||||
CCDBFDDC1E43366F005D6F08 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CCDBFDDC1E43366F005D6F08 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CCDBFDDB1E43366F005D6F08 /* HGCircularSlider.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CCDBFDDD1E43366F005D6F08 /* HGCircularSlider */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CCDBFDF51E4336C9005D6F08 /* Assets */,
|
||||
CCDBFDF71E4336C9005D6F08 /* Classes */,
|
||||
CCDBFDDE1E43366F005D6F08 /* HGCircularSlider.h */,
|
||||
CCDBFDDF1E43366F005D6F08 /* Info.plist */,
|
||||
);
|
||||
path = HGCircularSlider;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CCDBFDF51E4336C9005D6F08 /* Assets */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CCDBFDF61E4336C9005D6F08 /* .gitkeep */,
|
||||
);
|
||||
path = Assets;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CCDBFDF71E4336C9005D6F08 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
CCDBFDF91E4336C9005D6F08 /* CircularSlider+Draw.swift */,
|
||||
CCDBFDFA1E4336C9005D6F08 /* CircularSlider.swift */,
|
||||
CCDBFDFB1E4336C9005D6F08 /* CircularSliderHelper.swift */,
|
||||
CCCC96451E9F7FD000999D34 /* MidPointCircularSlider.swift */,
|
||||
CCDBFDFC1E4336C9005D6F08 /* RangeCircularSlider.swift */,
|
||||
);
|
||||
path = Classes;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
CCDBFDD81E43366F005D6F08 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
CCDBFDE01E43366F005D6F08 /* HGCircularSlider.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
CCDBFDDA1E43366F005D6F08 /* HGCircularSlider */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = CCDBFDE31E43366F005D6F08 /* Build configuration list for PBXNativeTarget "HGCircularSlider" */;
|
||||
buildPhases = (
|
||||
CCDBFDD61E43366F005D6F08 /* Sources */,
|
||||
CCDBFDD71E43366F005D6F08 /* Frameworks */,
|
||||
CCDBFDD81E43366F005D6F08 /* Headers */,
|
||||
CCDBFDD91E43366F005D6F08 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = HGCircularSlider;
|
||||
productName = HGCircularSlider;
|
||||
productReference = CCDBFDDB1E43366F005D6F08 /* HGCircularSlider.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
CCDBFDD21E43366F005D6F08 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = intive;
|
||||
TargetAttributes = {
|
||||
CCDBFDDA1E43366F005D6F08 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
DevelopmentTeam = R6JBLAQ685;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = CCDBFDD51E43366F005D6F08 /* Build configuration list for PBXProject "HGCircularSlider" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = CCDBFDD11E43366F005D6F08;
|
||||
productRefGroup = CCDBFDDC1E43366F005D6F08 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
CCDBFDDA1E43366F005D6F08 /* HGCircularSlider */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
CCDBFDD91E43366F005D6F08 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
CCDBFDFD1E4336C9005D6F08 /* .gitkeep in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
CCDBFDD61E43366F005D6F08 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
CCDBFDFF1E4336C9005D6F08 /* CircularSlider+Draw.swift in Sources */,
|
||||
CCDBFE021E4336C9005D6F08 /* RangeCircularSlider.swift in Sources */,
|
||||
CCDBFE001E4336C9005D6F08 /* CircularSlider.swift in Sources */,
|
||||
CCCC96461E9F7FD000999D34 /* MidPointCircularSlider.swift in Sources */,
|
||||
CCDBFE011E4336C9005D6F08 /* CircularSliderHelper.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
CCDBFDE11E43366F005D6F08 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
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;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
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_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.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
CCDBFDE21E43366F005D6F08 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
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;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
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.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
CCDBFDE41E43366F005D6F08 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = R6JBLAQ685;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = HGCircularSlider/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.intive.HGCircularSlider;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
CCDBFDE51E43366F005D6F08 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = R6JBLAQ685;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = HGCircularSlider/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.intive.HGCircularSlider;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
CCDBFDD51E43366F005D6F08 /* Build configuration list for PBXProject "HGCircularSlider" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
CCDBFDE11E43366F005D6F08 /* Debug */,
|
||||
CCDBFDE21E43366F005D6F08 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
CCDBFDE31E43366F005D6F08 /* Build configuration list for PBXNativeTarget "HGCircularSlider" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
CCDBFDE41E43366F005D6F08 /* Debug */,
|
||||
CCDBFDE51E43366F005D6F08 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = CCDBFDD21E43366F005D6F08 /* Project object */;
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:HGCircularSlider.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "CCDBFDDA1E43366F005D6F08"
|
||||
BuildableName = "HGCircularSlider.framework"
|
||||
BlueprintName = "HGCircularSlider"
|
||||
ReferencedContainer = "container:HGCircularSlider.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<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">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "CCDBFDDA1E43366F005D6F08"
|
||||
BuildableName = "HGCircularSlider.framework"
|
||||
BlueprintName = "HGCircularSlider"
|
||||
ReferencedContainer = "container:HGCircularSlider.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "CCDBFDDA1E43366F005D6F08"
|
||||
BuildableName = "HGCircularSlider.framework"
|
||||
BlueprintName = "HGCircularSlider"
|
||||
ReferencedContainer = "container:HGCircularSlider.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -29,6 +29,7 @@ extension CircularSlider {
|
||||
context.beginPath()
|
||||
|
||||
context.setLineWidth(lineWidth)
|
||||
context.setLineCap(CGLineCap.round)
|
||||
context.addArc(center: origin, radius: circle.radius, startAngle: arc.startAngle, endAngle: arc.endAngle, clockwise: false)
|
||||
context.move(to: CGPoint(x: origin.x, y: origin.y))
|
||||
context.drawPath(using: mode)
|
||||
@@ -43,39 +44,38 @@ extension CircularSlider {
|
||||
- parameter context: the context
|
||||
*/
|
||||
internal static func drawDisk(withArc arc: Arc, inContext context: CGContext) {
|
||||
|
||||
|
||||
let circle = arc.circle
|
||||
let origin = circle.origin
|
||||
|
||||
|
||||
UIGraphicsPushContext(context)
|
||||
context.beginPath()
|
||||
|
||||
|
||||
context.setLineWidth(0)
|
||||
context.addArc(center: origin, radius: circle.radius, startAngle: arc.startAngle, endAngle: arc.endAngle, clockwise: false)
|
||||
context.addLine(to: CGPoint(x: origin.x, y: origin.y))
|
||||
context.drawPath(using: .fill)
|
||||
|
||||
|
||||
UIGraphicsPopContext()
|
||||
}
|
||||
|
||||
|
||||
// MARK: drawing instance methods
|
||||
|
||||
|
||||
/// Draw the circular slider
|
||||
internal func drawCircularSlider(inContext context: CGContext) {
|
||||
diskColor.setFill()
|
||||
trackColor.setStroke()
|
||||
|
||||
|
||||
|
||||
let circle = Circle(origin: bounds.center, radius: self.radius)
|
||||
let sliderArc = Arc(circle: circle, startAngle: CircularSliderHelper.circleMinValue, endAngle: CircularSliderHelper.circleMaxValue)
|
||||
CircularSlider.drawArc(withArc: sliderArc, lineWidth: lineWidth, inContext: context)
|
||||
CircularSlider.drawArc(withArc: sliderArc, lineWidth: backtrackLineWidth, inContext: context)
|
||||
}
|
||||
|
||||
|
||||
/// draw Filled arc between start an end angles
|
||||
internal func drawFilledArc(fromAngle startAngle: CGFloat, toAngle endAngle: CGFloat, inContext context: CGContext) {
|
||||
diskFillColor.setFill()
|
||||
trackFillColor.setStroke()
|
||||
|
||||
|
||||
let circle = Circle(origin: bounds.center, radius: self.radius)
|
||||
let arc = Arc(circle: circle, startAngle: startAngle, endAngle: endAngle)
|
||||
|
||||
@@ -84,8 +84,18 @@ extension CircularSlider {
|
||||
// stroke Arc
|
||||
CircularSlider.drawArc(withArc: arc, lineWidth: lineWidth, mode: .stroke, inContext: context)
|
||||
}
|
||||
|
||||
|
||||
|
||||
internal func drawShadowArc(fromAngle startAngle: CGFloat, toAngle endAngle: CGFloat, inContext context: CGContext) {
|
||||
trackShadowColor.setStroke()
|
||||
|
||||
let origin = CGPoint(x: bounds.center.x + trackShadowOffset.x, y: bounds.center.y + trackShadowOffset.y)
|
||||
let circle = Circle(origin: origin, radius: self.radius)
|
||||
let arc = Arc(circle: circle, startAngle: startAngle, endAngle: endAngle)
|
||||
|
||||
// stroke Arc
|
||||
CircularSlider.drawArc(withArc: arc, lineWidth: lineWidth, mode: .stroke, inContext: context)
|
||||
}
|
||||
|
||||
/**
|
||||
Draw the thumb and return the coordinates of its center
|
||||
|
||||
@@ -100,12 +110,11 @@ extension CircularSlider {
|
||||
let thumbOrigin = CircularSliderHelper.endPoint(fromCircle: circle, angle: angle)
|
||||
let thumbCircle = Circle(origin: thumbOrigin, radius: thumbRadius)
|
||||
let thumbArc = Arc(circle: thumbCircle, startAngle: CircularSliderHelper.circleMinValue, endAngle: CircularSliderHelper.circleMaxValue)
|
||||
|
||||
|
||||
CircularSlider.drawArc(withArc: thumbArc, lineWidth: thumbLineWidth, inContext: context)
|
||||
return thumbOrigin
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
Draw thumb using image and return the coordinates of its center
|
||||
|
||||
@@ -116,7 +125,7 @@ extension CircularSlider {
|
||||
- returns: return the origin point of the thumb
|
||||
*/
|
||||
@discardableResult
|
||||
internal func drawThumb(withImage image: UIImage, angle: CGFloat, inContext context: CGContext) -> CGPoint {
|
||||
internal func drawThumb(withImage image: UIImage, angle: CGFloat, inContext context: CGContext) -> CGPoint {
|
||||
UIGraphicsPushContext(context)
|
||||
context.beginPath()
|
||||
let circle = Circle(origin: bounds.center, radius: self.radius)
|
||||
@@ -125,7 +134,7 @@ extension CircularSlider {
|
||||
let imageFrame = CGRect(x: thumbOrigin.x - (imageSize.width / 2), y: thumbOrigin.y - (imageSize.height / 2), width: imageSize.width, height: imageSize.height)
|
||||
image.draw(in: imageFrame)
|
||||
UIGraphicsPopContext()
|
||||
|
||||
|
||||
return thumbOrigin
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,28 +24,28 @@ open class CircularSlider: UIControl {
|
||||
* The default value is a transparent color.
|
||||
*/
|
||||
@IBInspectable
|
||||
open var diskFillColor: UIColor = UIColor.clear
|
||||
open var diskFillColor: UIColor = .clear
|
||||
|
||||
/**
|
||||
* The color shown for the unselected portion of the slider disk. (outside start and end values)
|
||||
* The default value of this property is the black color with alpha = 0.3.
|
||||
*/
|
||||
@IBInspectable
|
||||
open var diskColor: UIColor = UIColor.gray
|
||||
open var diskColor: UIColor = .gray
|
||||
|
||||
/**
|
||||
* The color shown for the selected track portion. (between start and end values)
|
||||
* The default value of this property is the tint color.
|
||||
*/
|
||||
@IBInspectable
|
||||
open var trackFillColor: UIColor = UIColor.clear
|
||||
open var trackFillColor: UIColor = .clear
|
||||
|
||||
/**
|
||||
* The color shown for the unselected track portion. (outside start and end values)
|
||||
* The default value of this property is the white color.
|
||||
*/
|
||||
@IBInspectable
|
||||
open var trackColor: UIColor = UIColor.white
|
||||
open var trackColor: UIColor = .white
|
||||
|
||||
/**
|
||||
* The width of the circular line
|
||||
@@ -54,7 +54,31 @@ open class CircularSlider: UIControl {
|
||||
*/
|
||||
@IBInspectable
|
||||
open var lineWidth: CGFloat = 5.0
|
||||
|
||||
|
||||
/**
|
||||
* The width of the unselected track portion of the slider
|
||||
*
|
||||
* The default value of this property is 5.0.
|
||||
*/
|
||||
@IBInspectable
|
||||
open var backtrackLineWidth: CGFloat = 5.0
|
||||
|
||||
/**
|
||||
* The shadow offset of the slider
|
||||
*
|
||||
* The default value of this property is .zero.
|
||||
*/
|
||||
@IBInspectable
|
||||
open var trackShadowOffset: CGPoint = .zero
|
||||
|
||||
/**
|
||||
* The color of the shadow offset of the slider
|
||||
*
|
||||
* The default value of this property is .gray.
|
||||
*/
|
||||
@IBInspectable
|
||||
open var trackShadowColor: UIColor = .gray
|
||||
|
||||
/**
|
||||
* The width of the thumb stroke line
|
||||
*
|
||||
@@ -78,14 +102,14 @@ open class CircularSlider: UIControl {
|
||||
* The default value of this property is the groupTableViewBackgroundColor.
|
||||
*/
|
||||
@IBInspectable
|
||||
open var endThumbTintColor: UIColor = UIColor.groupTableViewBackground
|
||||
open var endThumbTintColor: UIColor = .groupTableViewBackground
|
||||
|
||||
/**
|
||||
* The stroke highlighted color of the end thumb
|
||||
* The default value of this property is blue
|
||||
*/
|
||||
@IBInspectable
|
||||
open var endThumbStrokeHighlightedColor: UIColor = UIColor.blue
|
||||
open var endThumbStrokeHighlightedColor: UIColor = .blue
|
||||
|
||||
/**
|
||||
* The color used to tint the stroke of the end thumb
|
||||
@@ -94,7 +118,7 @@ open class CircularSlider: UIControl {
|
||||
* The default value of this property is red.
|
||||
*/
|
||||
@IBInspectable
|
||||
open var endThumbStrokeColor: UIColor = UIColor.red
|
||||
open var endThumbStrokeColor: UIColor = .red
|
||||
|
||||
/**
|
||||
* The image of the end thumb
|
||||
@@ -106,6 +130,18 @@ open class CircularSlider: UIControl {
|
||||
|
||||
// MARK: Accessing the Slider’s Value Limits
|
||||
|
||||
/**
|
||||
* Fixed number of rounds - how many circles has user to do to reach max value (like apple bedtime clock - which have 2)
|
||||
* the default value if this property is 1
|
||||
*/
|
||||
@IBInspectable
|
||||
open var numberOfRounds: Int = 1 {
|
||||
didSet {
|
||||
assert(numberOfRounds > 0, "Number of rounds has to be positive value!")
|
||||
setNeedsDisplay()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The minimum value of the receiver.
|
||||
*
|
||||
@@ -145,14 +181,14 @@ open class CircularSlider: UIControl {
|
||||
* The default value of this property is 0.5
|
||||
*/
|
||||
open var endPointValue: CGFloat = 0.5 {
|
||||
didSet {
|
||||
didSet {
|
||||
if oldValue == endPointValue {
|
||||
return
|
||||
}
|
||||
if endPointValue > maximumValue {
|
||||
endPointValue = maximumValue
|
||||
}
|
||||
|
||||
|
||||
setNeedsDisplay()
|
||||
}
|
||||
}
|
||||
@@ -200,7 +236,8 @@ open class CircularSlider: UIControl {
|
||||
internal func setup() {
|
||||
trackFillColor = tintColor
|
||||
}
|
||||
|
||||
|
||||
|
||||
// MARK: Drawing methods
|
||||
|
||||
/**
|
||||
@@ -211,7 +248,7 @@ open class CircularSlider: UIControl {
|
||||
|
||||
drawCircularSlider(inContext: context)
|
||||
|
||||
let valuesInterval = Interval(min: minimumValue, max: maximumValue)
|
||||
let valuesInterval = Interval(min: minimumValue, max: maximumValue, rounds: numberOfRounds)
|
||||
// get end angle from end value
|
||||
let endAngle = CircularSliderHelper.scaleToAngle(value: endPointValue, inInterval: valuesInterval) + CircularSliderHelper.circleInitialAngle
|
||||
|
||||
@@ -243,17 +280,12 @@ open class CircularSlider: UIControl {
|
||||
See superclass documentation
|
||||
*/
|
||||
override open func continueTracking(_ touch: UITouch, with event: UIEvent?) -> Bool {
|
||||
|
||||
// the position of the pan gesture
|
||||
let touchPosition = touch.location(in: self)
|
||||
|
||||
let startPoint = CGPoint(x: bounds.center.x, y: 0)
|
||||
let angle = CircularSliderHelper.angle(betweenFirstPoint: startPoint, secondPoint: touchPosition, inCircleWithCenter: bounds.center)
|
||||
let value = newValue(from: endPointValue, touch: touchPosition, start: startPoint)
|
||||
|
||||
let interval = Interval(min: minimumValue, max: maximumValue)
|
||||
let newValue = CircularSliderHelper.value(inInterval: interval, fromAngle: angle)
|
||||
|
||||
endPointValue = newValue
|
||||
endPointValue = value
|
||||
sendActions(for: .valueChanged)
|
||||
|
||||
return true
|
||||
@@ -266,4 +298,24 @@ open class CircularSlider: UIControl {
|
||||
sendActions(for: .editingDidEnd)
|
||||
}
|
||||
|
||||
// MARK: Utilities methods
|
||||
internal func newValue(from oldValue: CGFloat, touch touchPosition: CGPoint, start startPosition: CGPoint) -> CGFloat {
|
||||
let angle = CircularSliderHelper.angle(betweenFirstPoint: startPosition, secondPoint: touchPosition, inCircleWithCenter: bounds.center)
|
||||
let interval = Interval(min: minimumValue, max: maximumValue, rounds: numberOfRounds)
|
||||
let deltaValue = CircularSliderHelper.delta(in: interval, for: angle, oldValue: oldValue)
|
||||
|
||||
var newValue = oldValue + deltaValue
|
||||
let range = maximumValue - minimumValue
|
||||
|
||||
if newValue > maximumValue {
|
||||
newValue -= range
|
||||
}
|
||||
else if newValue < minimumValue {
|
||||
newValue += range
|
||||
}
|
||||
return newValue
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,16 +8,18 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
|
||||
// MARK: - Internal Structures
|
||||
internal struct Interval {
|
||||
var min: CGFloat = 0.0
|
||||
var max: CGFloat = 0.0
|
||||
var rounds: Int
|
||||
|
||||
init(min: CGFloat, max: CGFloat) {
|
||||
assert(min <= max, NSLocalizedString("Illegal interval", comment: ""))
|
||||
init(min: CGFloat, max: CGFloat, rounds: Int = 1) {
|
||||
assert(min <= max && rounds > 0, NSLocalizedString("Illegal interval", comment: ""))
|
||||
|
||||
self.min = min
|
||||
self.max = max
|
||||
self.rounds = rounds
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +49,8 @@ internal struct Arc {
|
||||
}
|
||||
}
|
||||
|
||||
extension CGVector {
|
||||
// MARK: - Internal Extensions
|
||||
internal extension CGVector {
|
||||
|
||||
/**
|
||||
Calculate the vector between two points
|
||||
@@ -83,7 +86,7 @@ extension CGVector {
|
||||
}
|
||||
}
|
||||
|
||||
extension CGRect {
|
||||
internal extension CGRect {
|
||||
|
||||
// get the center of rect (bounds or frame)
|
||||
internal var center: CGPoint {
|
||||
@@ -94,7 +97,8 @@ extension CGRect {
|
||||
}
|
||||
}
|
||||
|
||||
class CircularSliderHelper {
|
||||
// MARK: - Internal Helper
|
||||
internal class CircularSliderHelper {
|
||||
|
||||
@nonobjc static let circleMinValue: CGFloat = 0
|
||||
@nonobjc static let circleMaxValue: CGFloat = CGFloat(2 * Double.pi)
|
||||
@@ -133,7 +137,7 @@ class CircularSliderHelper {
|
||||
let angle = atan2(uv.determinant, uv.dotProduct)
|
||||
|
||||
// change the angle interval
|
||||
let newAngle = (angle < 0) ? -angle : Float(2 * Double.pi) - angle
|
||||
let newAngle = (angle < 0) ? -angle : Float(Double.pi * 2) - angle
|
||||
|
||||
return CGFloat(newAngle)
|
||||
}
|
||||
@@ -172,9 +176,10 @@ class CircularSliderHelper {
|
||||
- returns: the value in the new interval
|
||||
*/
|
||||
internal static func scaleValue(_ value: CGFloat, fromInterval source: Interval, toInterval destination: Interval) -> CGFloat {
|
||||
let sourceRange = source.max - source.min
|
||||
let destinationRange = destination.max - destination.min
|
||||
let newValue = (((value - source.min) * destinationRange) / sourceRange) + destination.min
|
||||
let sourceRange = (source.max - source.min) / CGFloat(source.rounds)
|
||||
let destinationRange = (destination.max - destination.min) / CGFloat(destination.rounds)
|
||||
let scaledValue = source.min + (value - source.min).truncatingRemainder(dividingBy: sourceRange)
|
||||
let newValue = (((scaledValue - source.min) * destinationRange) / sourceRange) + destination.min
|
||||
|
||||
return newValue
|
||||
}
|
||||
@@ -218,4 +223,31 @@ class CircularSliderHelper {
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
internal static func delta(in interval: Interval, for angle: CGFloat, oldValue: CGFloat) -> CGFloat {
|
||||
let angleIntreval = Interval(min: circleMinValue , max: circleMaxValue)
|
||||
|
||||
let oldAngle = scaleToAngle(value: oldValue, inInterval: interval)
|
||||
let deltaAngle = self.angle(from: oldAngle, to: angle)
|
||||
|
||||
return scaleValue(deltaAngle, fromInterval: angleIntreval, toInterval: interval)
|
||||
}
|
||||
|
||||
/**
|
||||
* Length (angular) of a shortest way between two angles.
|
||||
* It will be in range [-π/2, π/2], where sign means dir (+ for clockwise, - for counter clockwise).
|
||||
*/
|
||||
private static func angle(from alpha: CGFloat, to beta: CGFloat) -> CGFloat {
|
||||
let halfValue = circleMaxValue/2
|
||||
// Rotate right
|
||||
let offset = alpha >= halfValue ? circleMaxValue - alpha : -alpha
|
||||
let offsetBeta = beta + offset
|
||||
|
||||
if offsetBeta > halfValue {
|
||||
return offsetBeta - circleMaxValue
|
||||
}
|
||||
else {
|
||||
return offsetBeta
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ open class MidPointCircularSlider: RangeCircularSlider {
|
||||
override open var distance: CGFloat {
|
||||
didSet {
|
||||
assert(distance >= 0, "The MidPointCircularSlider works only with fixed distance between start and end points, so distance property should be > 0")
|
||||
endPointValue = startPointValue + distance
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,12 +86,12 @@ open class MidPointCircularSlider: RangeCircularSlider {
|
||||
*/
|
||||
required public init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
|
||||
distance = 0.2
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
distance = 0.2
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,7 +102,7 @@ open class MidPointCircularSlider: RangeCircularSlider {
|
||||
|
||||
drawCircularSlider(inContext: context)
|
||||
|
||||
let valuesInterval = Interval(min: minimumValue, max: maximumValue)
|
||||
let valuesInterval = Interval(min: minimumValue, max: maximumValue, rounds: numberOfRounds)
|
||||
|
||||
// get start angle from start value
|
||||
let startAngle = CircularSliderHelper.scaleToAngle(value: startPointValue, inInterval: valuesInterval) + CircularSliderHelper.circleInitialAngle
|
||||
@@ -142,13 +143,9 @@ open class MidPointCircularSlider: RangeCircularSlider {
|
||||
|
||||
let center = CGPoint(x: bounds.midX, y: bounds.midY)
|
||||
let startPoint = CGPoint(x: center.x, y: 0)
|
||||
let angle = CircularSliderHelper.angle(betweenFirstPoint: startPoint, secondPoint: touchPosition, inCircleWithCenter: center)
|
||||
let value = newValue(from: midPointValue, touch: touchPosition, start: startPoint)
|
||||
|
||||
let interval = Interval(min: minimumValue, max: maximumValue)
|
||||
let newValue = CircularSliderHelper.value(inInterval: interval, fromAngle: angle)
|
||||
|
||||
|
||||
midPointValue = newValue
|
||||
midPointValue = value
|
||||
sendActions(for: .valueChanged)
|
||||
|
||||
return true
|
||||
|
||||
@@ -14,13 +14,20 @@ import UIKit
|
||||
ValueChanged, EditingDidBegin and EditingDidEnd
|
||||
*/
|
||||
open class RangeCircularSlider: CircularSlider {
|
||||
|
||||
enum SelectedThumb {
|
||||
|
||||
public enum SelectedThumb {
|
||||
case startThumb
|
||||
case endThumb
|
||||
case none
|
||||
|
||||
var isStart: Bool {
|
||||
return self == SelectedThumb.startThumb
|
||||
}
|
||||
var isEnd: Bool {
|
||||
return self == SelectedThumb.endThumb
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: Changing the Slider’s Appearance
|
||||
|
||||
/**
|
||||
@@ -92,14 +99,14 @@ open class RangeCircularSlider: CircularSlider {
|
||||
}
|
||||
|
||||
/**
|
||||
* The fixed distance between the start value and the end value
|
||||
*
|
||||
* If you change the value of this property, the end value is adjusted to match (startPointValue + distance)
|
||||
* If the end value is above the maximum value, the end value is adjusted to match the maximum value and the start value is adjusted to match (endPointValue - distance)
|
||||
* To disable distance use -1 (by default)
|
||||
*
|
||||
* The default value of this property is -1
|
||||
*/
|
||||
* The fixed distance between the start value and the end value
|
||||
*
|
||||
* If you change the value of this property, the end value is adjusted to match (startPointValue + distance)
|
||||
* If the end value is above the maximum value, the end value is adjusted to match the maximum value and the start value is adjusted to match (endPointValue - distance)
|
||||
* To disable distance use -1 (by default)
|
||||
*
|
||||
* The default value of this property is -1
|
||||
*/
|
||||
@IBInspectable
|
||||
open var distance: CGFloat = -1 {
|
||||
didSet {
|
||||
@@ -108,6 +115,7 @@ open class RangeCircularSlider: CircularSlider {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The value in the start thumb.
|
||||
*
|
||||
@@ -118,9 +126,7 @@ open class RangeCircularSlider: CircularSlider {
|
||||
*/
|
||||
open var startPointValue: CGFloat = 0.0 {
|
||||
didSet {
|
||||
if oldValue == startPointValue {
|
||||
return
|
||||
}
|
||||
guard oldValue != startPointValue else { return }
|
||||
|
||||
if startPointValue < minimumValue {
|
||||
startPointValue = minimumValue
|
||||
@@ -143,7 +149,7 @@ open class RangeCircularSlider: CircularSlider {
|
||||
* The default value of this property is 0.5
|
||||
*/
|
||||
override open var endPointValue: CGFloat {
|
||||
didSet {
|
||||
didSet {
|
||||
if oldValue == endPointValue && distance <= 0 {
|
||||
return
|
||||
}
|
||||
@@ -217,31 +223,30 @@ open class RangeCircularSlider: CircularSlider {
|
||||
|
||||
drawCircularSlider(inContext: context)
|
||||
|
||||
let interval = Interval(min: minimumValue, max: maximumValue)
|
||||
let interval = Interval(min: minimumValue, max: maximumValue, rounds: numberOfRounds)
|
||||
// get start angle from start value
|
||||
let startAngle = CircularSliderHelper.scaleToAngle(value: startPointValue, inInterval: interval) + CircularSliderHelper.circleInitialAngle
|
||||
// get end angle from end value
|
||||
let endAngle = CircularSliderHelper.scaleToAngle(value: endPointValue, inInterval: interval) + CircularSliderHelper.circleInitialAngle
|
||||
|
||||
|
||||
drawShadowArc(fromAngle: startAngle, toAngle: endAngle, inContext: context)
|
||||
drawFilledArc(fromAngle: startAngle, toAngle: endAngle, inContext: context)
|
||||
|
||||
// end thumb
|
||||
endThumbTintColor.setFill()
|
||||
(isHighlighted == true && selectedThumb == .endThumb) ? endThumbStrokeHighlightedColor.setStroke() : endThumbStrokeColor.setStroke()
|
||||
endThumbCenter = drawThumb(withAngle: endAngle, inContext: context)
|
||||
if let image = endThumbImage {
|
||||
endThumbCenter = drawThumb(withImage: image, angle: endAngle, inContext: context)
|
||||
} else {
|
||||
endThumbCenter = drawThumb(withAngle: endAngle, inContext: context)
|
||||
}
|
||||
|
||||
// start thumb
|
||||
startThumbTintColor.setFill()
|
||||
(isHighlighted == true && selectedThumb == .startThumb) ? startThumbStrokeHighlightedColor.setStroke() : startThumbStrokeColor.setStroke()
|
||||
|
||||
|
||||
startThumbCenter = drawThumb(withAngle: startAngle, inContext: context)
|
||||
if let image = startThumbImage {
|
||||
startThumbCenter = drawThumb(withImage: image, angle: startAngle, inContext: context)
|
||||
} else {
|
||||
startThumbCenter = drawThumb(withAngle: startAngle, inContext: context)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,42 +259,51 @@ open class RangeCircularSlider: CircularSlider {
|
||||
sendActions(for: .editingDidBegin)
|
||||
// the position of the pan gesture
|
||||
let touchPosition = touch.location(in: self)
|
||||
|
||||
if isThumb(withCenter: startThumbCenter, containsPoint: touchPosition) {
|
||||
selectedThumb = .startThumb
|
||||
}
|
||||
else if isThumb(withCenter: endThumbCenter, containsPoint: touchPosition) {
|
||||
selectedThumb = .endThumb
|
||||
} else {
|
||||
selectedThumb = .none
|
||||
}
|
||||
|
||||
return (selectedThumb != .none)
|
||||
selectedThumb = thumb(for: touchPosition)
|
||||
|
||||
return selectedThumb != .none
|
||||
}
|
||||
|
||||
/**
|
||||
See superclass documentation
|
||||
*/
|
||||
override open func continueTracking(_ touch: UITouch, with event: UIEvent?) -> Bool {
|
||||
|
||||
guard selectedThumb != .none else {
|
||||
return false
|
||||
}
|
||||
|
||||
// the position of the pan gesture
|
||||
let touchPosition = touch.location(in: self)
|
||||
|
||||
let startPoint = CGPoint(x: bounds.center.x, y: 0)
|
||||
let angle = CircularSliderHelper.angle(betweenFirstPoint: startPoint, secondPoint: touchPosition, inCircleWithCenter: bounds.center)
|
||||
|
||||
let interval = Interval(min: minimumValue, max: maximumValue)
|
||||
let newValue = CircularSliderHelper.value(inInterval: interval, fromAngle: angle)
|
||||
let oldValue: CGFloat = selectedThumb.isStart ? startPointValue : endPointValue
|
||||
let value = newValue(from: oldValue, touch: touchPosition, start: startPoint)
|
||||
|
||||
|
||||
if selectedThumb == .startThumb {
|
||||
startPointValue = newValue
|
||||
}
|
||||
else {
|
||||
endPointValue = newValue
|
||||
if selectedThumb.isStart {
|
||||
startPointValue = value
|
||||
} else {
|
||||
endPointValue = value
|
||||
}
|
||||
sendActions(for: .valueChanged)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
override open func endTracking(_ touch: UITouch?, with event: UIEvent?) {
|
||||
super.endTracking(touch, with: event)
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Helpers
|
||||
open func thumb(for touchPosition: CGPoint) -> SelectedThumb {
|
||||
if isThumb(withCenter: startThumbCenter, containsPoint: touchPosition) {
|
||||
return .startThumb
|
||||
}
|
||||
else if isThumb(withCenter: endThumbCenter, containsPoint: touchPosition) {
|
||||
return .endThumb
|
||||
} else {
|
||||
return .none
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// HGCircularSlider.h
|
||||
// HGCircularSlider
|
||||
//
|
||||
// Created by Andrzej Michnia on 02.02.2017.
|
||||
// Copyright © 2017 intive. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for HGCircularSlider.
|
||||
FOUNDATION_EXPORT double HGCircularSliderVersionNumber;
|
||||
|
||||
//! Project version string for HGCircularSlider.
|
||||
FOUNDATION_EXPORT const unsigned char HGCircularSliderVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <HGCircularSlider/PublicHeader.h>
|
||||
|
||||
|
||||
@@ -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>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -5,7 +5,9 @@
|
||||
[](http://cocoapods.org/pods/HGCircularSlider)
|
||||
[](http://cocoapods.org/pods/HGCircularSlider)
|
||||
[]()
|
||||
[](http://cocoapods.org/pods/HGCircularSlider) <br />
|
||||
[](http://cocoapods.org/pods/HGCircularSlider)
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
<br />
|
||||
|
||||
[](https://codebeat.co/projects/github-com-hamzaghazouani-hgcircularslider)
|
||||
[](http://cocoadocs.org/docsets/HGCircularSlider/)
|
||||
@@ -13,13 +15,13 @@
|
||||
|
||||
## Example
|
||||
|
||||
   
|
||||
    
|
||||
|
||||
To run the example project, clone the repo, and run `pod install` from the Example directory first.
|
||||
|
||||
## Requirements
|
||||
|
||||
- iOS 7.1+
|
||||
- iOS 9.0+
|
||||
- Xcode 8.0
|
||||
|
||||
## Installation
|
||||
@@ -28,13 +30,25 @@ HGCircularSlider is available through [CocoaPods](http://cocoapods.org). To inst
|
||||
it, simply add the following line to your Podfile:
|
||||
|
||||
``` ruby
|
||||
|
||||
# Swift 3.1 - Xcode 8.3
|
||||
pod 'HGCircularSlider', '~> 1.1.0'
|
||||
pod 'HGCircularSlider', '~> 2.0.0'
|
||||
|
||||
# Swift 3 - Xcode 8
|
||||
pod 'HGCircularSlider', '~> 1.0.3'
|
||||
|
||||
# Swift 2.2 - Xcode 7.3.1 (Checkout Swift2_Xcode7.3 branche)
|
||||
pod 'HGCircularSlider', '~> 0.1.2'
|
||||
```
|
||||
|
||||
HGCircularSlider is also available through [Carthage](https://github.com/Carthage/Carthage). To install
|
||||
it, simply add the following line to your Cartfile:
|
||||
|
||||
|
||||
``` ruby
|
||||
# Swift 3.1 - Xcode 8
|
||||
github "HamzaGhazouani/HGCircularSlider"
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
1. Change the class of a view from UIView to CircularSlider, RangeCircularSlider or MidPointCircularSlider
|
||||
@@ -46,7 +60,7 @@ circularSlider.minimumValue = 0.0
|
||||
circularSlider.maximumValue = 1.0
|
||||
circularSlider.endPointValue = 0.2
|
||||
|
||||
```
|
||||
```
|
||||
OR
|
||||
```
|
||||
let circularSlider = RangeCircularSlider(frame: myFrame)
|
||||
@@ -58,7 +72,8 @@ circularSlider.maximumValue = CGFloat(dayInSeconds)
|
||||
|
||||
circularSlider.startPointValue = 1 * 60 * 60
|
||||
circularSlider.endPointValue = 8 * 60 * 60
|
||||
```
|
||||
circularSlider.numberOfRounds = 2 // Two rotations for full 24h range
|
||||
```
|
||||
OR
|
||||
```
|
||||
let circularSlider = MidPointCircularSlider(frame: myFrame)
|
||||
@@ -68,15 +83,15 @@ circularSlider.distance = 1.0
|
||||
circularSlider.midPointValue = 5.0
|
||||
```
|
||||
## Documentation
|
||||
Full documentation is available on [CocoaDocs](http://cocoadocs.org/docsets/HGCircularSlider/).<br/>
|
||||
Full documentation is available on [CocoaDocs](http://cocoadocs.org/docsets/HGCircularSlider/).<br/>
|
||||
You can also install documentation locally using [jazzy](https://github.com/realm/jazzy).
|
||||
|
||||
## References
|
||||
## References
|
||||
The UI examples of the demo project inspired from [Dribbble](https://dribbble.com).
|
||||
|
||||
[Player](https://dribbble.com/shots/3062636-Countdown-Timer-Daily-UI-014) <br/>
|
||||
[BasicExample](https://dribbble.com/shots/2153963-Dompet-Wallet-App)<br/>
|
||||
[OClock](https://dribbble.com/shots/2671286-Clock-Alarm-app)<br/>
|
||||
[Player](https://dribbble.com/shots/3062636-Countdown-Timer-Daily-UI-014) <br/>
|
||||
[BasicExample](https://dribbble.com/shots/2153963-Dompet-Wallet-App)<br/>
|
||||
[OClock](https://dribbble.com/shots/2671286-Clock-Alarm-app)<br/>
|
||||
|
||||
The project is Inspired by [UICircularSlider](https://github.com/Zedenem/UICircularSlider)
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 158 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 320 KiB |
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 152 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 121 KiB |
@@ -1 +0,0 @@
|
||||
Example/Pods/Pods.xcodeproj
|
||||