Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4b13d893b | |||
| 7bbe00a4e0 | |||
| 93dd566aee | |||
| 2cecb9d0ee | |||
| 0a71b41da3 | |||
| 0a9b0ecbc1 |
@@ -0,0 +1 @@
|
||||
language: objective-c
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Clock View Controller-->
|
||||
<!--Clock-->
|
||||
<scene sceneID="t1m-6j-OQq">
|
||||
<objects>
|
||||
<viewController id="CT4-vj-wFA" customClass="ClockViewController" customModule="HGCircularSlider_Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
@@ -16,11 +16,11 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="lUY-qL-6BD"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="4jd-aQ-SwJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="431"/>
|
||||
<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="50" width="268" height="57"/>
|
||||
<rect key="frame" x="26" y="-2" width="268" 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="126.5" height="57"/>
|
||||
@@ -30,6 +30,7 @@
|
||||
<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="calibratedRGB"/>
|
||||
</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"/>
|
||||
@@ -40,7 +41,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="9.5" y="24" width="108" height="33"/>
|
||||
<rect key="frame" x="9" 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="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -48,7 +49,7 @@
|
||||
</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="141.5" y="0.0" width="126.5" height="57"/>
|
||||
<rect key="frame" x="141" y="0.0" width="126.5" height="57"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="GT6-Lu-cLO">
|
||||
<rect key="frame" x="15" y="0.0" width="97" height="24"/>
|
||||
@@ -75,7 +76,7 @@
|
||||
</subviews>
|
||||
</stackView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B7k-gj-MGd" customClass="RangeCircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="16" y="123" width="288" height="288"/>
|
||||
<rect key="frame" x="16" y="71.5" width="288" height="288"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="B7k-gj-MGd" secondAttribute="height" id="NVA-rO-PLq"/>
|
||||
@@ -102,7 +103,7 @@
|
||||
</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="119" y="239.5" width="82" height="55"/>
|
||||
<rect key="frame" x="119" y="188" 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="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -112,16 +113,17 @@
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="dyk-gn-E0m" firstAttribute="leading" secondItem="4jd-aQ-SwJ" secondAttribute="leadingMargin" constant="10" id="Dl0-lI-EH6"/>
|
||||
<constraint firstItem="dyk-gn-E0m" firstAttribute="top" secondItem="yFY-UW-SEd" secondAttribute="bottom" constant="30" id="Eew-cG-a7y"/>
|
||||
<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"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<tabBarItem key="tabBarItem" title="" image="ic_bedtime" id="ift-R0-ETx"/>
|
||||
<extendedEdge key="edgesForExtendedLayout" top="YES"/>
|
||||
<tabBarItem key="tabBarItem" title="Clock" image="second" id="ift-R0-ETx"/>
|
||||
<navigationItem key="navigationItem" id="GQt-LM-Ytd"/>
|
||||
<connections>
|
||||
<outlet property="bedtimeLabel" destination="Ode-Tz-DNv" id="a1P-nt-aaZ"/>
|
||||
@@ -142,17 +144,21 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="49"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<color key="tintColor" red="0.89411764709999997" green="0.93333333330000001" blue="0.38823529410000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="barTintColor" red="0.17254901960784313" green="0.15686274509803921" blue="0.16862745098039217" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</tabBar>
|
||||
<connections>
|
||||
<segue destination="CT4-vj-wFA" kind="relationship" relationship="viewControllers" id="pZZ-eo-szV"/>
|
||||
<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"/>
|
||||
</connections>
|
||||
</tabBarController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="gDj-DB-klF" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-1113" y="2067"/>
|
||||
</scene>
|
||||
<!--Player View Controller-->
|
||||
<!--Player-->
|
||||
<scene sceneID="90r-0D-nKE">
|
||||
<objects>
|
||||
<viewController id="tLb-gm-5PK" customClass="PlayerViewController" customModule="HGCircularSlider_Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
@@ -161,11 +167,11 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="qfh-d6-sk8"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="neD-ad-Dbx">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="431"/>
|
||||
<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="67.5" width="240" height="345"/>
|
||||
<rect key="frame" x="40" y="43" width="240" height="345"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x2l-Xh-2MZ" customClass="CircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="0.0" y="0.0" width="240" height="240"/>
|
||||
@@ -220,7 +226,7 @@
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="9nw-2D-CbD">
|
||||
<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="317" width="240" height="29"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="28" id="Tdt-J7-hiZ"/>
|
||||
@@ -236,7 +242,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="77" y="163" width="167" height="48"/>
|
||||
<rect key="frame" x="77" y="139" width="167" height="48"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="ultraLight" pointSize="40"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
@@ -252,7 +258,8 @@
|
||||
<constraint firstItem="c7m-F5-dgq" firstAttribute="centerY" secondItem="neD-ad-Dbx" secondAttribute="centerY" id="og5-LJ-ZPv"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<tabBarItem key="tabBarItem" title="" image="ic_wake" id="VaG-Vm-OZC"/>
|
||||
<extendedEdge key="edgesForExtendedLayout" top="YES"/>
|
||||
<tabBarItem key="tabBarItem" title="Player" image="first" id="VaG-Vm-OZC"/>
|
||||
<navigationItem key="navigationItem" id="INE-nv-dyL"/>
|
||||
<connections>
|
||||
<outlet property="circularSlider" destination="x2l-Xh-2MZ" id="nOH-vj-id4"/>
|
||||
@@ -264,10 +271,304 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-251" y="2267"/>
|
||||
</scene>
|
||||
<!--Example-->
|
||||
<scene sceneID="stQ-nu-pyE">
|
||||
<objects>
|
||||
<viewController id="Npo-RV-git" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="kg8-3T-le0"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="I5G-Jl-WfO"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="kxo-la-Q5X">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="431"/>
|
||||
<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="46" y="101" width="228" height="228"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="228" id="Kx9-Mg-DfE"/>
|
||||
<constraint firstAttribute="width" secondItem="P7G-Iv-4Jm" secondAttribute="height" id="aGA-yL-Kg8"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="lineWidth">
|
||||
<real key="value" value="15"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="trackFillColor">
|
||||
<color key="value" red="0.92156862745098034" green="0.18431372549019609" blue="0.38039215686274508" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="trackColor">
|
||||
<color key="value" red="0.35686274509803922" green="0.70196078431372544" blue="0.92549019607843142" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="distance">
|
||||
<real key="value" value="0.14999999999999999"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="diskColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="midThumbStrokeHighlightedColor">
|
||||
<color key="value" red="0.92156862750000001" green="0.1843137255" blue="0.3803921569" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="midThumbStrokeColor">
|
||||
<color key="value" red="0.35686274509999999" green="0.70196078429999997" blue="0.92549019610000005" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="thumbRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="diskFillColor">
|
||||
<color key="value" red="0.35686274509999999" green="0.70196078429999997" blue="0.92549019610000005" alpha="0.13957435344827587" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="updateTexts:" destination="CT4-vj-wFA" eventType="valueChanged" id="PPZ-hO-mha"/>
|
||||
</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="85" y="140.5" 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"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="22"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth">
|
||||
<integer key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
<integer key="value" value="75"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.borderUIColor">
|
||||
<color key="value" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.38039215686274508" green="0.33725490196078434" blue="0.43529411764705883" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Cfm-Db-wi2" firstAttribute="centerY" secondItem="kxo-la-Q5X" secondAttribute="centerY" id="PTz-yo-VP9"/>
|
||||
<constraint firstItem="Cfm-Db-wi2" firstAttribute="centerX" secondItem="kxo-la-Q5X" secondAttribute="centerX" id="QSS-kS-W8Q"/>
|
||||
<constraint firstItem="P7G-Iv-4Jm" firstAttribute="centerY" secondItem="kxo-la-Q5X" secondAttribute="centerY" id="cE7-ML-C09"/>
|
||||
<constraint firstItem="P7G-Iv-4Jm" firstAttribute="centerX" secondItem="kxo-la-Q5X" secondAttribute="centerX" id="dct-rR-CWI"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" top="YES"/>
|
||||
<tabBarItem key="tabBarItem" title="Example" image="second" id="etG-Rt-332"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="11N-ZE-qqz" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-274" y="2943"/>
|
||||
</scene>
|
||||
<!--OClock-->
|
||||
<scene sceneID="qvZ-oN-u0x">
|
||||
<objects>
|
||||
<viewController id="fOf-1m-bg4" customClass="OClockViewController" customModule="HGCircularSlider_Example" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="1an-df-x8V"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="zbM-Dt-5AV"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="fAM-4k-cvc">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="431"/>
|
||||
<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="100" y="20" width="120" height="45"/>
|
||||
<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="8.5" width="120" height="29"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="120" id="3jN-4n-QeQ"/>
|
||||
</constraints>
|
||||
<segments>
|
||||
<segment title="AM"/>
|
||||
<segment title="PM"/>
|
||||
</segments>
|
||||
<color key="tintColor" red="0.99215686270000003" green="0.75294117650000003" blue="0.035294117649999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<action selector="switchBetweenAMAndPM:" destination="fOf-1m-bg4" eventType="valueChanged" id="Ztd-XM-Khe"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="time_indicators" translatesAutoresizingMaskIntoConstraints="NO" id="iV1-rk-1SV">
|
||||
<rect key="frame" x="9" y="65" 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="100" y="136" 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="calibratedRGB"/>
|
||||
<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="calibratedRGB"/>
|
||||
<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="calibratedRGB"/>
|
||||
<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="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</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="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kWD-6U-Cha" customClass="CircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="29" y="85" width="261" height="261"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<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>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="trackFillColor">
|
||||
<color key="value" red="0.87450980389999999" green="0.80000000000000004" blue="0.22352941179999999" alpha="0.79496228449999995" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="trackColor">
|
||||
<color key="value" red="1" green="1" blue="1" alpha="0.10000000000000001" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="lineWidth">
|
||||
<real key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="thumbRadius">
|
||||
<real key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="endThumbTintColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="endThumbStrokeColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="endThumbStrokeHighlightedColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XLN-xb-Www" customClass="CircularSlider" customModule="HGCircularSlider">
|
||||
<rect key="frame" x="54" y="110" width="211" height="211"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<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>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="trackFillColor">
|
||||
<color key="value" red="0.87450980392156863" green="0.80000000000000004" blue="0.22352941176470587" alpha="0.79496228448275863" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="trackColor">
|
||||
<color key="value" red="1" green="1" blue="1" alpha="0.10000000000000001" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="lineWidth">
|
||||
<real key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="thumbRadius">
|
||||
<real key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="endThumbTintColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="endThumbStrokeColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="endThumbStrokeHighlightedColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="mzf-rC-Kpg">
|
||||
<rect key="frame" x="94" y="366" width="132" height="65"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="i8l-FT-Qb1">
|
||||
<rect key="frame" x="0.0" y="12.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="calibratedRGB"/>
|
||||
<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="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.12549019607843137" green="0.14509803921568626" blue="0.21568627450980393" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="kWD-6U-Cha" firstAttribute="top" secondItem="iV1-rk-1SV" secondAttribute="top" constant="20" id="0n6-Li-FgA"/>
|
||||
<constraint firstItem="iV1-rk-1SV" firstAttribute="top" secondItem="WRY-kB-aj8" secondAttribute="bottom" id="3ax-Zd-hhc"/>
|
||||
<constraint firstItem="zbM-Dt-5AV" firstAttribute="top" secondItem="mzf-rC-Kpg" secondAttribute="bottom" id="5XY-P4-hTG"/>
|
||||
<constraint firstItem="mzf-rC-Kpg" firstAttribute="top" secondItem="iV1-rk-1SV" secondAttribute="bottom" id="5Za-Ci-xLj"/>
|
||||
<constraint firstItem="XLN-xb-Www" firstAttribute="top" secondItem="iV1-rk-1SV" secondAttribute="top" constant="45" id="9T6-yX-BQQ"/>
|
||||
<constraint firstItem="kWD-6U-Cha" firstAttribute="leading" secondItem="iV1-rk-1SV" secondAttribute="leading" constant="20" id="BYE-sV-fA8"/>
|
||||
<constraint firstItem="kWD-6U-Cha" firstAttribute="bottom" secondItem="iV1-rk-1SV" secondAttribute="bottom" constant="-20" id="G0o-91-fzn"/>
|
||||
<constraint firstItem="WRY-kB-aj8" firstAttribute="top" secondItem="1an-df-x8V" secondAttribute="bottom" id="TiW-Jt-Dk1"/>
|
||||
<constraint firstItem="iV1-rk-1SV" firstAttribute="centerX" secondItem="fAM-4k-cvc" secondAttribute="centerX" id="UnE-yE-bn8"/>
|
||||
<constraint firstItem="Hes-2U-VeA" firstAttribute="centerX" secondItem="fAM-4k-cvc" secondAttribute="centerX" id="Zd8-yK-3zg"/>
|
||||
<constraint firstItem="XLN-xb-Www" firstAttribute="leading" secondItem="iV1-rk-1SV" secondAttribute="leading" constant="45" id="bVW-XM-lsI"/>
|
||||
<constraint firstItem="kWD-6U-Cha" firstAttribute="trailing" secondItem="iV1-rk-1SV" secondAttribute="trailing" constant="-20" id="eLq-m4-kd9"/>
|
||||
<constraint firstItem="mzf-rC-Kpg" firstAttribute="centerX" secondItem="fAM-4k-cvc" secondAttribute="centerX" id="gsB-O8-g3b"/>
|
||||
<constraint firstItem="XLN-xb-Www" firstAttribute="trailing" secondItem="iV1-rk-1SV" secondAttribute="trailing" constant="-45" id="lK9-dG-HiI"/>
|
||||
<constraint firstItem="XLN-xb-Www" firstAttribute="bottom" secondItem="iV1-rk-1SV" secondAttribute="bottom" constant="-45" id="rFq-4G-Ttz"/>
|
||||
<constraint firstItem="WRY-kB-aj8" firstAttribute="centerX" secondItem="fAM-4k-cvc" secondAttribute="centerX" id="rt8-Ai-DO3"/>
|
||||
<constraint firstItem="Hes-2U-VeA" firstAttribute="centerY" secondItem="fAM-4k-cvc" secondAttribute="centerY" id="soc-Wl-11O"/>
|
||||
<constraint firstItem="iV1-rk-1SV" firstAttribute="centerY" secondItem="fAM-4k-cvc" secondAttribute="centerY" id="t8i-wJ-Rln"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<extendedEdge key="edgesForExtendedLayout" top="YES"/>
|
||||
<tabBarItem key="tabBarItem" title="OClock" image="first" id="Li3-0d-UGZ"/>
|
||||
<connections>
|
||||
<outlet property="AMPMLabel" destination="Jhh-41-cud" id="6pi-FG-7E6"/>
|
||||
<outlet property="hoursCircularSlider" destination="XLN-xb-Www" id="K4y-TO-Kd2"/>
|
||||
<outlet property="hoursLabel" destination="hbF-TF-3lB" id="4iV-bM-ONC"/>
|
||||
<outlet property="minutesCircularSlider" destination="kWD-6U-Cha" id="XwY-y5-04n"/>
|
||||
<outlet property="minutesLabel" destination="t63-gB-ld3" id="cfn-X4-Tf4"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="4jZ-R1-SB1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-288" y="3562"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="first" width="30" height="30"/>
|
||||
<image name="ic_bedtime" width="17" height="19"/>
|
||||
<image name="ic_wake" width="13" height="16"/>
|
||||
<image name="second" width="30" height="30"/>
|
||||
<image name="time_indicators" width="301" height="300"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "first.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
+4
-10
@@ -2,20 +2,14 @@
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_bedtime.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
"filename" : "ic_bedtime.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
||||
@@ -2,16 +2,7 @@
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_wake.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
"filename" : "ic_wake.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "second.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "second.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "time_indicators.pdf",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// OClockViewController.swift
|
||||
// HGCircularSlider
|
||||
//
|
||||
// Created by Hamza Ghazouani on 09/11/2016.
|
||||
// Copyright © 2016 CocoaPods. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import HGCircularSlider
|
||||
|
||||
class OClockViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var minutesCircularSlider: CircularSlider!
|
||||
@IBOutlet weak var hoursCircularSlider: CircularSlider!
|
||||
|
||||
@IBOutlet weak var hoursLabel: UILabel!
|
||||
@IBOutlet weak var minutesLabel: UILabel!
|
||||
@IBOutlet weak var AMPMLabel: UILabel!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupSliders()
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
super.didReceiveMemoryWarning()
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
func setupSliders() {
|
||||
// hours
|
||||
hoursCircularSlider.minimumValue = 0
|
||||
hoursCircularSlider.maximumValue = 12
|
||||
hoursCircularSlider.endPointValue = 6
|
||||
hoursCircularSlider.addTarget(self, action: #selector(updateHours), forControlEvents: .ValueChanged)
|
||||
|
||||
// minutes
|
||||
minutesCircularSlider.minimumValue = 0
|
||||
minutesCircularSlider.maximumValue = 60
|
||||
minutesCircularSlider.endPointValue = 35
|
||||
minutesCircularSlider.addTarget(self, action: #selector(updateMinutes), forControlEvents: .ValueChanged)
|
||||
|
||||
|
||||
}
|
||||
|
||||
// MARK: user interaction methods
|
||||
|
||||
// TODO: the thumb of hoursSlider should get only Int values (slide directly from 3 to 4, from 4 to 5, etc)
|
||||
func updateHours() {
|
||||
var selectedHour = Int(hoursCircularSlider.endPointValue)
|
||||
// TODO: use date formatter
|
||||
selectedHour = selectedHour == 0 ? 12 : selectedHour
|
||||
|
||||
// TODO: remove that
|
||||
if hoursCircularSlider.endPointValue > (CGFloat(selectedHour) + 0.5) && minutesCircularSlider.endPointValue > 30 {
|
||||
selectedHour += 1
|
||||
}
|
||||
|
||||
hoursLabel.text = String(selectedHour)
|
||||
}
|
||||
|
||||
func updateMinutes() {
|
||||
let selectedMinute = Int(minutesCircularSlider.endPointValue)
|
||||
minutesLabel.text = String(format: "%02d", selectedMinute)
|
||||
|
||||
// TODO: remove that
|
||||
updateHours()
|
||||
}
|
||||
|
||||
@IBAction func switchBetweenAMAndPM(sender: UISegmentedControl) {
|
||||
AMPMLabel.text = sender.selectedSegmentIndex == 0 ? "AM" : "PM"
|
||||
}
|
||||
|
||||
/*
|
||||
// MARK: - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
|
||||
// Get the new view controller using segue.destinationViewController.
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// OtherExampleViewController.swift
|
||||
// HGCircularSlider
|
||||
//
|
||||
// Created by Hamza Ghazouani on 09/11/2016.
|
||||
// Copyright © 2016 CocoaPods. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension CALayer {
|
||||
|
||||
func borderUIColor() -> UIColor? {
|
||||
return borderColor != nil ? UIColor(CGColor: borderColor!) : nil
|
||||
}
|
||||
|
||||
func setBorderUIColor(color: UIColor) {
|
||||
borderColor = color.CGColor
|
||||
}
|
||||
}
|
||||
|
||||
class OtherExampleViewController: UIViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
super.didReceiveMemoryWarning()
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// MARK: - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
|
||||
// Get the new view controller using segue.destinationViewController.
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
+11
-24
@@ -7,15 +7,10 @@
|
||||
#
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'HGCircularSlider'
|
||||
s.version = '0.1.0'
|
||||
s.summary = 'Multiple Circular Sliders used to select a value from a continuous range of values.'
|
||||
s.name = 'HGCircularSlider'
|
||||
s.version = '0.1.1'
|
||||
s.summary = 'Multiple Circular Sliders used to select a value from a continuous range of values.'
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
# * Think: What does it do? Why did you write it? What is the focus?
|
||||
# * Try to keep it short, snappy and to the point.
|
||||
# * Write the description between the DESC delimiters below.
|
||||
# * Finally, don't worry about the indent, CocoaPods strips it!
|
||||
|
||||
s.description = <<-DESC
|
||||
Circular Sliders used to select a value from a continuous range of values.
|
||||
@@ -26,23 +21,15 @@ MidPointCircularSlider: slider with fixed range to select a range of values from
|
||||
|
||||
DESC
|
||||
|
||||
s.homepage = 'https://github.com/HamzaGhazouani/HGCircularSlider'
|
||||
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.author = { 'Hamza Ghazouani' => 'hamza.ghazouani@gmail.com' }
|
||||
s.source = { :git => 'https://github.com/HamzaGhazouani/HGCircularSlider.git', :tag => s.version.to_s }
|
||||
s.social_media_url = 'https://twitter.com/GhazouaniHamza'
|
||||
s.homepage = 'https://github.com/HamzaGhazouani/HGCircularSlider'
|
||||
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.author = { 'Hamza Ghazouani' => 'hamza.ghazouani@gmail.com' }
|
||||
s.source = { :git => 'https://github.com/HamzaGhazouani/HGCircularSlider.git', :tag => s.version.to_s }
|
||||
s.social_media_url = 'https://twitter.com/GhazouaniHamza'
|
||||
|
||||
s.ios.deployment_target = '8.0'
|
||||
s.ios.deployment_target = '8.0'
|
||||
|
||||
s.source_files = 'HGCircularSlider/Classes/**/*'
|
||||
s.source_files = 'HGCircularSlider/Classes/**/*'
|
||||
|
||||
# s.resource_bundles = {
|
||||
# 'HGCircularSlider' => ['HGCircularSlider/Assets/*.png']
|
||||
# }
|
||||
|
||||
# s.public_header_files = 'Pod/Classes/**/*.h'
|
||||
# s.frameworks = 'UIKit', 'MapKit'
|
||||
# s.dependency 'AFNetworking', '~> 2.3'
|
||||
|
||||
end
|
||||
|
||||
@@ -87,6 +87,10 @@ public class MidPointCircularSlider: RangeCircularSlider {
|
||||
distance = 0.2
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
}
|
||||
|
||||
/**
|
||||
See superclass documentation
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user