Edu Caselles

Adds switch to demo view to reflect the new functionality around disabling animations.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="9Rt-UT-IxH">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="9Rt-UT-IxH">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
... ... @@ -33,66 +33,87 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qR7-40-7ir">
<rect key="frame" x="261" y="502" width="51" height="31"/>
<connections>
<action selector="rightSwitchChanged:" destination="Tha-Wr-sPW" eventType="valueChanged" id="n6V-lL-r8Q"/>
</connections>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Percentage" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IKu-qh-ksi">
<rect key="frame" x="16" y="541" width="88" height="21"/>
<rect key="frame" x="16" y="539" width="88" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Show Labels" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ifm-a9-Wkq">
<rect key="frame" x="211" y="540" width="99" height="21"/>
<rect key="frame" x="205" y="538" width="99" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="99" id="KZW-Ru-GZO"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="kav-3r-blI">
<rect key="frame" x="136" y="461" width="51" height="31"/>
<rect key="frame" x="16" y="434" width="51" height="31"/>
<connections>
<action selector="centerSwitchChanged:" destination="Tha-Wr-sPW" eventType="valueChanged" id="ETI-hb-d8F"/>
<action selector="rightSwitchChanged:" destination="Tha-Wr-sPW" eventType="valueChanged" id="2Rs-PH-2WM"/>
</connections>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Multiple Selection" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sMF-o9-dZX">
<rect key="frame" x="92" y="498" width="137" height="21"/>
<rect key="frame" x="16" y="471" width="137" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ORA-mb-hJl">
<rect key="frame" x="16" y="502" width="51" height="31"/>
<rect key="frame" x="16" y="500" width="51" height="31"/>
<connections>
<action selector="leftSwitchChanged:" destination="Tha-Wr-sPW" eventType="valueChanged" id="q9T-QK-Sas"/>
</connections>
</switch>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Mnm-Is-oih" userLabel="Animations Switch">
<rect key="frame" x="255" y="434" width="51" height="31"/>
<connections>
<action selector="animationsSwitchChanged:" destination="Tha-Wr-sPW" eventType="valueChanged" id="lC4-5M-rlC"/>
</connections>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Animations" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lc1-oP-FNw">
<rect key="frame" x="218" y="471" width="86" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qR7-40-7ir">
<rect key="frame" x="255" y="500" width="51" height="31"/>
<connections>
<action selector="rightSwitchChanged:" destination="Tha-Wr-sPW" eventType="valueChanged" id="n6V-lL-r8Q"/>
</connections>
</switch>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="qR7-40-7ir" firstAttribute="top" secondItem="kav-3r-blI" secondAttribute="bottom" constant="10" id="4Qo-Xx-bbF"/>
<constraint firstItem="Mnm-Is-oih" firstAttribute="centerY" secondItem="kav-3r-blI" secondAttribute="centerY" id="0NI-PI-ATH"/>
<constraint firstItem="ORA-mb-hJl" firstAttribute="centerY" secondItem="qR7-40-7ir" secondAttribute="centerY" id="7c9-My-TTD"/>
<constraint firstItem="IKu-qh-ksi" firstAttribute="top" secondItem="ORA-mb-hJl" secondAttribute="bottom" constant="8" id="7vb-uB-f1x"/>
<constraint firstItem="Ifm-a9-Wkq" firstAttribute="top" secondItem="qR7-40-7ir" secondAttribute="bottom" constant="7" id="9ET-Wq-Yen"/>
<constraint firstItem="qR7-40-7ir" firstAttribute="top" secondItem="lc1-oP-FNw" secondAttribute="bottom" constant="8" id="A54-NU-I6K"/>
<constraint firstItem="FUU-vZ-jMd" firstAttribute="top" secondItem="znr-YO-4a4" secondAttribute="bottom" constant="17" id="DLv-qJ-h7R"/>
<constraint firstItem="sMF-o9-dZX" firstAttribute="top" secondItem="kav-3r-blI" secondAttribute="bottom" constant="6" id="Fy1-r9-rOd"/>
<constraint firstAttribute="trailingMargin" secondItem="qR7-40-7ir" secondAttribute="trailing" constant="-6" id="UdE-fM-LAZ"/>
<constraint firstItem="Ifm-a9-Wkq" firstAttribute="trailing" secondItem="qR7-40-7ir" secondAttribute="trailing" id="Im7-AC-dup"/>
<constraint firstItem="ORA-mb-hJl" firstAttribute="top" secondItem="sMF-o9-dZX" secondAttribute="bottom" constant="8" symbolic="YES" id="K0Z-Kz-m2p"/>
<constraint firstAttribute="trailingMargin" secondItem="qR7-40-7ir" secondAttribute="trailing" id="KZ9-eM-6oW"/>
<constraint firstItem="kav-3r-blI" firstAttribute="leading" secondItem="PPb-b8-nBo" secondAttribute="leadingMargin" id="KrJ-mU-I6l"/>
<constraint firstAttribute="centerX" secondItem="FUU-vZ-jMd" secondAttribute="centerX" id="YGT-a5-Zka"/>
<constraint firstItem="kav-3r-blI" firstAttribute="centerX" secondItem="sMF-o9-dZX" secondAttribute="centerX" id="aUL-sS-9ZE"/>
<constraint firstAttribute="centerX" secondItem="kav-3r-blI" secondAttribute="centerX" id="aap-Gv-rtz"/>
<constraint firstAttribute="trailingMargin" secondItem="Ifm-a9-Wkq" secondAttribute="trailing" constant="-6" id="byo-2X-TrB"/>
<constraint firstItem="kav-3r-blI" firstAttribute="top" secondItem="L3F-13-Wf5" secondAttribute="bottom" constant="67" id="eO9-bU-rZY"/>
<constraint firstItem="lc1-oP-FNw" firstAttribute="trailing" secondItem="Mnm-Is-oih" secondAttribute="trailing" id="YrP-Jx-D1J"/>
<constraint firstItem="lc1-oP-FNw" firstAttribute="top" secondItem="Mnm-Is-oih" secondAttribute="bottom" constant="6" id="Zsm-LK-7NY"/>
<constraint firstAttribute="trailingMargin" secondItem="Mnm-Is-oih" secondAttribute="trailing" id="bnI-nC-1qS"/>
<constraint firstItem="kav-3r-blI" firstAttribute="top" secondItem="L3F-13-Wf5" secondAttribute="bottom" constant="40" id="eO9-bU-rZY"/>
<constraint firstItem="L3F-13-Wf5" firstAttribute="top" secondItem="znr-YO-4a4" secondAttribute="bottom" constant="300" id="ewm-kv-p8k"/>
<constraint firstItem="IKu-qh-ksi" firstAttribute="leading" secondItem="PPb-b8-nBo" secondAttribute="leadingMargin" id="m9a-Ug-SfK"/>
<constraint firstItem="ORA-mb-hJl" firstAttribute="leading" secondItem="PPb-b8-nBo" secondAttribute="leadingMargin" id="oZO-il-Fd5"/>
<constraint firstItem="sMF-o9-dZX" firstAttribute="leading" secondItem="kav-3r-blI" secondAttribute="leading" id="qtt-KE-YfT"/>
<constraint firstAttribute="centerX" secondItem="L3F-13-Wf5" secondAttribute="centerX" id="zXw-WV-mro"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="PNChart" id="Ukg-Sg-E2z"/>
<connections>
<outlet property="animationsSwitch" destination="Mnm-Is-oih" id="haB-27-exI"/>
<outlet property="centerSwitch" destination="kav-3r-blI" id="aDA-mR-FhR"/>
<outlet property="changeValueButton" destination="L3F-13-Wf5" id="JnI-y3-Xpj"/>
<outlet property="leftLabel" destination="IKu-qh-ksi" id="CPy-oy-qCP"/>
... ... @@ -198,12 +219,14 @@
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" indentationLevel="1" indentationWidth="0.0" textLabel="YOU-SK-mQU" style="IBUITableViewCellStyleDefault" id="JJR-oU-C7n">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="240" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JJR-oU-C7n" id="iJk-3W-tcy">
<rect key="frame" x="0.0" y="0.0" width="287" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="ScatterChart" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="YOU-SK-mQU">
<rect key="frame" x="15" y="0.0" width="270" height="43"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
... ... @@ -216,7 +239,7 @@
</connections>
</tableViewCell>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="Sjk-AS-XhW" style="IBUITableViewCellStyleDefault" id="bev-fA-J4Q">
<rect key="frame" x="0.0" y="196" width="320" height="44"/>
<rect key="frame" x="0.0" y="284" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bev-fA-J4Q" id="nSV-Wu-TAu">
<rect key="frame" x="0.0" y="0.0" width="287" height="43"/>
... ... @@ -261,11 +284,6 @@
<point key="canvasLocation" x="-318" y="31"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
<segue reference="pvQ-oy-a9a"/>
</inferredMetricsTieBreakers>
... ...
... ... @@ -24,6 +24,7 @@
- (IBAction)changeValue:(id)sender;
@property (weak, nonatomic) IBOutlet UIButton *changeValueButton;
@property (weak, nonatomic) IBOutlet UISwitch *animationsSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *leftSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *centerSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *rightSwitch;
... ...
... ... @@ -183,6 +183,8 @@
}
else if ([self.title isEqualToString:@"Scatter Chart"])
{
self.animationsSwitch.hidden = YES;
self.titleLabel.text = @"Scatter Chart";
self.scatterChart = [[PNScatterChart alloc] initWithFrame:CGRectMake(SCREEN_WIDTH /6.0 - 30, 135, 280, 200)];
... ... @@ -387,4 +389,29 @@
[self.radarChart strokeChart];
}
}
- (IBAction)animationsSwitchChanged:(UISwitch *)sender
{
if ([self.title isEqualToString:@"Circle Chart"]) {
self.circleChart.displayAnimated = sender.on;
[self.circleChart strokeChart];
}
else if ([self.title isEqualToString:@"Line Chart"]) {
self.lineChart.displayAnimated = sender.on;
[self.lineChart strokeChart];
}
else if ([self.title isEqualToString:@"Bar Chart"]) {
self.barChart.displayAnimated = sender.on;
[self.barChart strokeChart];
}
else if ([self.title isEqualToString:@"Pie Chart"]) {
self.pieChart.displayAnimated = sender.on;
[self.pieChart strokeChart];
}
else if ([self.title isEqualToString:@"Radar Chart"]) {
self.radarChart.displayAnimated = sender.on;
[self.radarChart strokeChart];
}
}
@end
... ...