Added ordering system toggle, ordering system help, auto refresh option, fixed some constraints, added scroll view to CustomizationViewController to fit more options, added missing German translations

This commit is contained in:
Deniz Duezgoeren
2019-09-25 19:17:23 +02:00
parent 8f261a019f
commit b4f3b2f92f
9 changed files with 237 additions and 104 deletions
+173 -97
View File
@@ -62,103 +62,151 @@
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1XB-6S-dGV"> <scrollView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iAl-ff-skU">
<rect key="frame" x="0.0" y="44" width="414" height="44"/> <rect key="frame" x="0.0" y="89.000000000000028" width="414" height="386.66666666666674"/>
<items>
<navigationItem title="Customize" id="9Pf-pB-wLS">
<barButtonItem key="rightBarButtonItem" title="Save" id="PWA-cp-z6o">
<connections>
<action selector="done:" destination="8XB-jK-YFD" id="7wR-PO-v0i"/>
</connections>
</barButtonItem>
</navigationItem>
</items>
</navigationBar>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iAl-ff-skU">
<rect key="frame" x="0.0" y="89" width="414" height="231"/>
<subviews> <subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Your name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="TpM-Mz-EpI"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qtg-4Y-ylA">
<rect key="frame" x="24" y="16" width="366" height="30"/> <rect key="frame" x="0.0" y="0.0" width="414" height="343"/>
<accessibility key="accessibilityConfiguration" hint="Name"/> <subviews>
<nil key="textColor"/> <textField opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Your courses" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="EDB-Mm-gGh">
<fontDescription key="fontDescription" type="system" pointSize="14"/> <rect key="frame" x="24" y="108" width="328" height="30"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/> <accessibility key="accessibilityConfiguration" hint="Courses"/>
</textField> <nil key="textColor"/>
<textField opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Your classes" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bCV-w1-hVY"> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<rect key="frame" x="24" y="62" width="328" height="30"/> <textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/>
<accessibility key="accessibilityConfiguration" hint="Classes"/> </textField>
<nil key="textColor"/> <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pBV-74-ixQ">
<fontDescription key="fontDescription" type="system" pointSize="14"/> <rect key="frame" x="368" y="66" width="22" height="22"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/> <connections>
</textField> <action selector="groupHelpButton:" destination="8XB-jK-YFD" eventType="touchUpInside" id="0Tg-rj-Kiz"/>
<textField opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Your courses" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="69O-Fo-TQF"> </connections>
<rect key="frame" x="24" y="108" width="328" height="30"/> </button>
<accessibility key="accessibilityConfiguration" hint="Courses"/> <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fjp-fp-qWH">
<nil key="textColor"/> <rect key="frame" x="368" y="112" width="22" height="22"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <connections>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/> <action selector="courseHelpButton:" destination="8XB-jK-YFD" eventType="touchUpInside" id="Ie8-OI-gSz"/>
</textField> </connections>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Default plan" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hkV-XP-jXe"> </button>
<rect key="frame" x="24" y="154" width="366" height="21"/> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Default plan" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JMH-JV-eMe">
<fontDescription key="fontDescription" type="system" pointSize="17"/> <rect key="frame" x="24" y="154" width="366" height="21"/>
<nil key="textColor"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/> <nil key="textColor"/>
</label> <nil key="highlightedColor"/>
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bcl-Ha-O4z"> </label>
<rect key="frame" x="368" y="66" width="22" height="22"/> <textField opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="749" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Your classes" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gOX-RF-Brg">
<connections> <rect key="frame" x="24" y="62" width="328" height="30"/>
<action selector="groupHelpButton:" destination="8XB-jK-YFD" eventType="touchUpInside" id="7xi-30-v0V"/> <accessibility key="accessibilityConfiguration" hint="Classes"/>
</connections> <nil key="textColor"/>
</button> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eQo-BP-t2k"> <textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/>
<rect key="frame" x="368" y="112" width="22" height="22"/> </textField>
<connections> <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Your name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ZCm-7a-IUx">
<action selector="courseHelpButton:" destination="8XB-jK-YFD" eventType="touchUpInside" id="7fx-Ol-OkW"/> <rect key="frame" x="24" y="16" width="366" height="30"/>
</connections> <accessibility key="accessibilityConfiguration" hint="Name"/>
</button> <nil key="textColor"/>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="1" translatesAutoresizingMaskIntoConstraints="NO" id="omP-RH-Hlh"> <fontDescription key="fontDescription" type="system" pointSize="14"/>
<rect key="frame" x="24" y="187" width="366" height="29"/> <textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/>
<segments> </textField>
<segment title="General"/> <segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="1" translatesAutoresizingMaskIntoConstraints="NO" id="DPm-52-1Ww">
<segment title="Personal"/> <rect key="frame" x="24" y="183" width="366" height="29"/>
</segments> <segments>
</segmentedControl> <segment title="General"/>
<segment title="Personal"/>
</segments>
</segmentedControl>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Ordering system" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3iB-va-Cjs">
<rect key="frame" x="24" y="223" width="328" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="1" translatesAutoresizingMaskIntoConstraints="NO" id="ol8-tW-I69">
<rect key="frame" x="24" y="252" width="366" height="29"/>
<segments>
<segment title="App specific"/>
<segment title="Website original"/>
</segments>
</segmentedControl>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="EWJ-Yo-CtW">
<rect key="frame" x="341" y="296" width="51" height="31"/>
<color key="onTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Auto refresh on app startup" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YlM-R8-zk5">
<rect key="frame" x="24" y="301" width="301" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="252" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="detailDisclosure" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="teY-2x-Plv">
<rect key="frame" x="368" y="222.66666666666669" width="22" height="22"/>
<connections>
<action selector="orderHelpButton:" destination="8XB-jK-YFD" eventType="touchUpInside" id="7SG-ka-imy"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="JMH-JV-eMe" secondAttribute="trailing" constant="24" id="093-HT-vRO"/>
<constraint firstItem="YlM-R8-zk5" firstAttribute="centerY" secondItem="EWJ-Yo-CtW" secondAttribute="centerY" id="5wN-hP-lMT"/>
<constraint firstItem="ol8-tW-I69" firstAttribute="top" secondItem="3iB-va-Cjs" secondAttribute="bottom" constant="8" id="7oJ-2S-EF2"/>
<constraint firstAttribute="trailing" secondItem="ZCm-7a-IUx" secondAttribute="trailing" constant="24" id="8r6-R6-pq1"/>
<constraint firstItem="EDB-Mm-gGh" firstAttribute="leading" secondItem="qtg-4Y-ylA" secondAttribute="leading" constant="24" id="ARl-RY-O2q"/>
<constraint firstItem="DPm-52-1Ww" firstAttribute="leading" secondItem="qtg-4Y-ylA" secondAttribute="leading" constant="24" id="AoV-52-XcC"/>
<constraint firstItem="teY-2x-Plv" firstAttribute="centerY" secondItem="3iB-va-Cjs" secondAttribute="centerY" id="CNh-d1-kdt"/>
<constraint firstItem="3iB-va-Cjs" firstAttribute="leading" secondItem="qtg-4Y-ylA" secondAttribute="leading" constant="24" id="E2z-XG-LjJ"/>
<constraint firstAttribute="trailing" secondItem="Fjp-fp-qWH" secondAttribute="trailing" constant="24" id="EYn-tQ-h6h"/>
<constraint firstItem="Fjp-fp-qWH" firstAttribute="centerY" secondItem="EDB-Mm-gGh" secondAttribute="centerY" id="FdK-vg-kax"/>
<constraint firstAttribute="trailing" secondItem="DPm-52-1Ww" secondAttribute="trailing" constant="24" id="G2l-nv-qY6"/>
<constraint firstItem="EDB-Mm-gGh" firstAttribute="top" secondItem="gOX-RF-Brg" secondAttribute="bottom" constant="16" id="GV7-lY-x7p"/>
<constraint firstItem="teY-2x-Plv" firstAttribute="leading" secondItem="3iB-va-Cjs" secondAttribute="trailing" constant="16" id="Gac-Q0-cKv"/>
<constraint firstItem="ol8-tW-I69" firstAttribute="leading" secondItem="qtg-4Y-ylA" secondAttribute="leading" constant="24" id="HTK-sJ-rjE"/>
<constraint firstAttribute="trailing" secondItem="EWJ-Yo-CtW" secondAttribute="trailing" constant="24" id="If9-Ye-lmS"/>
<constraint firstItem="gOX-RF-Brg" firstAttribute="leading" secondItem="qtg-4Y-ylA" secondAttribute="leading" constant="24" id="JUo-WS-6j2"/>
<constraint firstItem="3iB-va-Cjs" firstAttribute="top" secondItem="DPm-52-1Ww" secondAttribute="bottom" constant="12" id="OGC-uf-xYk"/>
<constraint firstItem="ZCm-7a-IUx" firstAttribute="top" secondItem="qtg-4Y-ylA" secondAttribute="top" constant="16" id="POd-Sp-Xcd"/>
<constraint firstItem="DPm-52-1Ww" firstAttribute="top" secondItem="JMH-JV-eMe" secondAttribute="bottom" constant="8" id="Rnd-dX-Ywk"/>
<constraint firstItem="JMH-JV-eMe" firstAttribute="leading" secondItem="qtg-4Y-ylA" secondAttribute="leading" constant="24" id="ZtE-nY-Bjy"/>
<constraint firstItem="Fjp-fp-qWH" firstAttribute="leading" secondItem="EDB-Mm-gGh" secondAttribute="trailing" constant="16" id="buX-Cn-u5w"/>
<constraint firstItem="EWJ-Yo-CtW" firstAttribute="leading" secondItem="YlM-R8-zk5" secondAttribute="trailing" constant="16" id="bzg-iq-EiS"/>
<constraint firstItem="ZCm-7a-IUx" firstAttribute="leading" secondItem="qtg-4Y-ylA" secondAttribute="leading" constant="24" id="cB0-MQ-url"/>
<constraint firstAttribute="bottom" secondItem="EWJ-Yo-CtW" secondAttribute="bottom" constant="16" id="cJi-jL-tJe"/>
<constraint firstAttribute="trailing" secondItem="teY-2x-Plv" secondAttribute="trailing" constant="24" id="eZ4-jd-Tcy"/>
<constraint firstAttribute="trailing" secondItem="pBV-74-ixQ" secondAttribute="trailing" constant="24" id="gSE-LM-Pgg"/>
<constraint firstAttribute="trailing" secondItem="ol8-tW-I69" secondAttribute="trailing" constant="24" id="gVp-is-Q10"/>
<constraint firstItem="YlM-R8-zk5" firstAttribute="leading" secondItem="qtg-4Y-ylA" secondAttribute="leading" constant="24" id="k26-N7-3f1"/>
<constraint firstItem="JMH-JV-eMe" firstAttribute="top" secondItem="EDB-Mm-gGh" secondAttribute="bottom" constant="16" id="oBN-Vp-yTh"/>
<constraint firstItem="pBV-74-ixQ" firstAttribute="leading" secondItem="gOX-RF-Brg" secondAttribute="trailing" constant="16" id="oOD-wb-nkh"/>
<constraint firstItem="gOX-RF-Brg" firstAttribute="top" secondItem="ZCm-7a-IUx" secondAttribute="bottom" constant="16" id="oTV-EW-U78"/>
<constraint firstItem="EWJ-Yo-CtW" firstAttribute="top" secondItem="ol8-tW-I69" secondAttribute="bottom" constant="16" id="oaG-aE-Rcv"/>
<constraint firstItem="pBV-74-ixQ" firstAttribute="centerY" secondItem="gOX-RF-Brg" secondAttribute="centerY" id="zo8-q4-BjH"/>
</constraints>
</view>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="69O-Fo-TQF" firstAttribute="leading" secondItem="iAl-ff-skU" secondAttribute="leading" constant="24" id="2FL-7N-HJO"/> <constraint firstItem="qtg-4Y-ylA" firstAttribute="width" secondItem="iAl-ff-skU" secondAttribute="width" id="6GC-RJ-mSY"/>
<constraint firstAttribute="trailing" secondItem="hkV-XP-jXe" secondAttribute="trailing" constant="24" id="4ZG-c5-lUu"/> <constraint firstAttribute="trailing" secondItem="qtg-4Y-ylA" secondAttribute="trailing" id="DRw-aL-agj"/>
<constraint firstAttribute="trailing" secondItem="TpM-Mz-EpI" secondAttribute="trailing" constant="24" id="A4N-lD-pgd"/> <constraint firstAttribute="bottom" secondItem="qtg-4Y-ylA" secondAttribute="bottom" id="McH-CB-hVU"/>
<constraint firstAttribute="bottom" secondItem="omP-RH-Hlh" secondAttribute="bottom" constant="16" id="Aob-zt-PTb"/> <constraint firstItem="qtg-4Y-ylA" firstAttribute="leading" secondItem="iAl-ff-skU" secondAttribute="leading" id="rTW-Al-SaN"/>
<constraint firstAttribute="trailing" secondItem="eQo-BP-t2k" secondAttribute="trailing" constant="24" id="CFc-LX-Cl4"/> <constraint firstItem="qtg-4Y-ylA" firstAttribute="top" secondItem="iAl-ff-skU" secondAttribute="top" id="wyu-TK-k91"/>
<constraint firstItem="omP-RH-Hlh" firstAttribute="leading" secondItem="iAl-ff-skU" secondAttribute="leading" constant="24" id="GoG-3f-NFd"/>
<constraint firstItem="bcl-Ha-O4z" firstAttribute="leading" secondItem="bCV-w1-hVY" secondAttribute="trailing" constant="16" id="HEX-GP-NuJ"/>
<constraint firstAttribute="trailing" secondItem="bcl-Ha-O4z" secondAttribute="trailing" constant="24" id="OA9-1L-OT9"/>
<constraint firstItem="bcl-Ha-O4z" firstAttribute="centerY" secondItem="bCV-w1-hVY" secondAttribute="centerY" id="Qin-2R-y2G"/>
<constraint firstItem="bCV-w1-hVY" firstAttribute="top" secondItem="TpM-Mz-EpI" secondAttribute="bottom" constant="16" id="R8P-Mm-bd0"/>
<constraint firstAttribute="trailing" secondItem="omP-RH-Hlh" secondAttribute="trailing" constant="24" id="Ryt-Wu-QWj"/>
<constraint firstItem="eQo-BP-t2k" firstAttribute="leading" secondItem="69O-Fo-TQF" secondAttribute="trailing" constant="16" id="VvK-jS-8qP"/>
<constraint firstItem="TpM-Mz-EpI" firstAttribute="top" secondItem="iAl-ff-skU" secondAttribute="top" constant="16" id="WcH-lu-gmN"/>
<constraint firstItem="69O-Fo-TQF" firstAttribute="top" secondItem="bCV-w1-hVY" secondAttribute="bottom" constant="16" id="bOA-Dz-eB4"/>
<constraint firstItem="omP-RH-Hlh" firstAttribute="top" secondItem="hkV-XP-jXe" secondAttribute="bottom" constant="12" id="eAT-ba-MuB"/>
<constraint firstItem="hkV-XP-jXe" firstAttribute="leading" secondItem="iAl-ff-skU" secondAttribute="leading" constant="24" id="fXg-xr-nwy"/>
<constraint firstItem="eQo-BP-t2k" firstAttribute="centerY" secondItem="69O-Fo-TQF" secondAttribute="centerY" id="qQu-95-XUA"/>
<constraint firstItem="bCV-w1-hVY" firstAttribute="leading" secondItem="iAl-ff-skU" secondAttribute="leading" constant="24" id="twO-Ty-mtH"/>
<constraint firstItem="hkV-XP-jXe" firstAttribute="top" secondItem="69O-Fo-TQF" secondAttribute="bottom" constant="16" id="vL4-Uu-2Bd"/>
<constraint firstItem="TpM-Mz-EpI" firstAttribute="leading" secondItem="iAl-ff-skU" secondAttribute="leading" constant="24" id="ykh-Uy-8MV"/>
</constraints> </constraints>
</view> </scrollView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3ae-Qn-llh"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3ae-Qn-llh">
<rect key="frame" x="0.0" y="320" width="414" height="542"/> <rect key="frame" x="0.0" y="475.66666666666674" width="414" height="386.33333333333326"/>
<subviews> <subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sNo-gi-NHQ">
<rect key="frame" x="16" y="3" width="382" height="1"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<variation key="heightClass=compact" hidden="YES"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="Custom colours" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rks-gf-AM4"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="Custom colours" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rks-gf-AM4">
<rect key="frame" x="24" y="0.0" width="366" height="21"/> <rect key="frame" x="24" y="16" width="366" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/> <nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="hWP-3N-RUn"> <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="hWP-3N-RUn">
<rect key="frame" x="8" y="37" width="398" height="505"/> <rect key="frame" x="8" y="52.999999999999943" width="398" height="333.33333333333331"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<collectionViewLayout key="collectionViewLayout" id="sCM-Sc-0Zw" customClass="MagazineLayout" customModule="MagazineLayout"/> <collectionViewLayout key="collectionViewLayout" id="sCM-Sc-0Zw" customClass="MagazineLayout" customModule="MagazineLayout"/>
<cells/> <cells/>
@@ -173,29 +221,54 @@
<constraint firstItem="hWP-3N-RUn" firstAttribute="leading" secondItem="3ae-Qn-llh" secondAttribute="leading" constant="8" id="1ht-Ws-T8Y"/> <constraint firstItem="hWP-3N-RUn" firstAttribute="leading" secondItem="3ae-Qn-llh" secondAttribute="leading" constant="8" id="1ht-Ws-T8Y"/>
<constraint firstItem="hWP-3N-RUn" firstAttribute="top" secondItem="rks-gf-AM4" secondAttribute="bottom" constant="16" id="5Ss-pW-THK"/> <constraint firstItem="hWP-3N-RUn" firstAttribute="top" secondItem="rks-gf-AM4" secondAttribute="bottom" constant="16" id="5Ss-pW-THK"/>
<constraint firstAttribute="trailing" secondItem="hWP-3N-RUn" secondAttribute="trailing" constant="8" id="72H-9z-A6Z"/> <constraint firstAttribute="trailing" secondItem="hWP-3N-RUn" secondAttribute="trailing" constant="8" id="72H-9z-A6Z"/>
<constraint firstItem="rks-gf-AM4" firstAttribute="top" secondItem="3ae-Qn-llh" secondAttribute="top" id="8kR-rm-gdJ"/> <constraint firstItem="rks-gf-AM4" firstAttribute="top" secondItem="3ae-Qn-llh" secondAttribute="top" constant="16" id="8kR-rm-gdJ"/>
<constraint firstItem="sNo-gi-NHQ" firstAttribute="top" secondItem="3ae-Qn-llh" secondAttribute="top" constant="3" id="9Pu-Yg-Xe8"/>
<constraint firstItem="rks-gf-AM4" firstAttribute="top" secondItem="sNo-gi-NHQ" secondAttribute="bottom" constant="12" id="FaY-u1-rgA"/>
<constraint firstAttribute="trailing" secondItem="sNo-gi-NHQ" secondAttribute="trailing" constant="16" id="H2W-Gn-eHO"/>
<constraint firstAttribute="bottom" secondItem="hWP-3N-RUn" secondAttribute="bottom" id="bPr-ng-hbt"/> <constraint firstAttribute="bottom" secondItem="hWP-3N-RUn" secondAttribute="bottom" id="bPr-ng-hbt"/>
<constraint firstAttribute="trailing" secondItem="rks-gf-AM4" secondAttribute="trailing" constant="24" id="deG-Uk-50h"/> <constraint firstAttribute="trailing" secondItem="rks-gf-AM4" secondAttribute="trailing" constant="24" id="deG-Uk-50h"/>
<constraint firstItem="rks-gf-AM4" firstAttribute="leading" secondItem="3ae-Qn-llh" secondAttribute="leading" constant="24" id="eQ0-7G-zMb"/> <constraint firstItem="rks-gf-AM4" firstAttribute="leading" secondItem="3ae-Qn-llh" secondAttribute="leading" constant="24" id="eQ0-7G-zMb"/>
<constraint firstItem="sNo-gi-NHQ" firstAttribute="leading" secondItem="3ae-Qn-llh" secondAttribute="leading" constant="16" id="otd-pX-fbe"/>
</constraints> </constraints>
</view> </view>
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1XB-6S-dGV">
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<items>
<navigationItem title="Customize" id="9Pf-pB-wLS">
<barButtonItem key="rightBarButtonItem" title="Save" id="PWA-cp-z6o">
<connections>
<action selector="done:" destination="8XB-jK-YFD" id="7wR-PO-v0i"/>
</connections>
</barButtonItem>
</navigationItem>
</items>
</navigationBar>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Hjo-bd-Xxz">
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="3ae-Qn-llh" firstAttribute="top" secondItem="iAl-ff-skU" secondAttribute="bottom" id="48i-EM-6px"/>
<constraint firstItem="iN7-lf-GS3" firstAttribute="trailing" secondItem="iAl-ff-skU" secondAttribute="trailing" id="AoD-6m-Zah"/> <constraint firstItem="iN7-lf-GS3" firstAttribute="trailing" secondItem="iAl-ff-skU" secondAttribute="trailing" id="AoD-6m-Zah"/>
<constraint firstItem="Hjo-bd-Xxz" firstAttribute="top" secondItem="3L4-c2-Pow" secondAttribute="top" id="GNh-7e-neI"/>
<constraint firstItem="iN7-lf-GS3" firstAttribute="bottom" secondItem="3ae-Qn-llh" secondAttribute="bottom" id="H2b-Bw-SPo"/> <constraint firstItem="iN7-lf-GS3" firstAttribute="bottom" secondItem="3ae-Qn-llh" secondAttribute="bottom" id="H2b-Bw-SPo"/>
<constraint firstItem="3ae-Qn-llh" firstAttribute="leading" secondItem="iN7-lf-GS3" secondAttribute="leading" id="JSj-x6-uUy"/> <constraint firstItem="3ae-Qn-llh" firstAttribute="leading" secondItem="iN7-lf-GS3" secondAttribute="leading" id="JSj-x6-uUy"/>
<constraint firstItem="iAl-ff-skU" firstAttribute="top" secondItem="1XB-6S-dGV" secondAttribute="bottom" constant="1" id="KyF-sn-SYG"/> <constraint firstItem="iAl-ff-skU" firstAttribute="top" secondItem="1XB-6S-dGV" secondAttribute="bottom" constant="1" id="KyF-sn-SYG"/>
<constraint firstItem="Hjo-bd-Xxz" firstAttribute="bottom" secondItem="iN7-lf-GS3" secondAttribute="top" id="M3x-Aa-eXW"/>
<constraint firstAttribute="trailing" secondItem="Hjo-bd-Xxz" secondAttribute="trailing" id="MYQ-uI-g81"/>
<constraint firstItem="3ae-Qn-llh" firstAttribute="leading" secondItem="iAl-ff-skU" secondAttribute="trailing" id="Ojd-xl-Edq"/> <constraint firstItem="3ae-Qn-llh" firstAttribute="leading" secondItem="iAl-ff-skU" secondAttribute="trailing" id="Ojd-xl-Edq"/>
<constraint firstItem="iAl-ff-skU" firstAttribute="height" secondItem="3ae-Qn-llh" secondAttribute="height" id="SB2-jE-rZX"/>
<constraint firstItem="iAl-ff-skU" firstAttribute="leading" secondItem="3L4-c2-Pow" secondAttribute="leading" id="SI9-hB-Om4"/> <constraint firstItem="iAl-ff-skU" firstAttribute="leading" secondItem="3L4-c2-Pow" secondAttribute="leading" id="SI9-hB-Om4"/>
<constraint firstItem="3ae-Qn-llh" firstAttribute="top" secondItem="1XB-6S-dGV" secondAttribute="bottom" constant="16" id="T5g-Sq-0j2"/> <constraint firstItem="3ae-Qn-llh" firstAttribute="top" secondItem="1XB-6S-dGV" secondAttribute="bottom" id="T5g-Sq-0j2"/>
<constraint firstItem="iN7-lf-GS3" firstAttribute="bottom" secondItem="3ae-Qn-llh" secondAttribute="bottom" id="VHJ-b1-MUU"/> <constraint firstItem="iN7-lf-GS3" firstAttribute="bottom" secondItem="3ae-Qn-llh" secondAttribute="bottom" id="VHJ-b1-MUU"/>
<constraint firstItem="iN7-lf-GS3" firstAttribute="trailing" secondItem="1XB-6S-dGV" secondAttribute="trailing" id="ViL-Rg-PN8"/> <constraint firstItem="iN7-lf-GS3" firstAttribute="trailing" secondItem="1XB-6S-dGV" secondAttribute="trailing" id="ViL-Rg-PN8"/>
<constraint firstItem="iAl-ff-skU" firstAttribute="width" secondItem="3ae-Qn-llh" secondAttribute="width" id="WSU-eO-T8S"/> <constraint firstItem="iAl-ff-skU" firstAttribute="width" secondItem="3ae-Qn-llh" secondAttribute="width" id="WSU-eO-T8S"/>
<constraint firstItem="iAl-ff-skU" firstAttribute="leading" secondItem="iN7-lf-GS3" secondAttribute="leading" id="efn-u4-JYI"/> <constraint firstItem="iAl-ff-skU" firstAttribute="leading" secondItem="iN7-lf-GS3" secondAttribute="leading" id="efn-u4-JYI"/>
<constraint firstItem="iAl-ff-skU" firstAttribute="top" secondItem="1XB-6S-dGV" secondAttribute="bottom" constant="1" id="fxU-4n-vS8"/> <constraint firstItem="iAl-ff-skU" firstAttribute="top" secondItem="1XB-6S-dGV" secondAttribute="bottom" constant="1" id="fxU-4n-vS8"/>
<constraint firstItem="iN7-lf-GS3" firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="iAl-ff-skU" secondAttribute="bottom" id="o0D-wq-Ew9"/> <constraint firstItem="Hjo-bd-Xxz" firstAttribute="leading" secondItem="iN7-lf-GS3" secondAttribute="leading" id="lzs-fS-tfJ"/>
<constraint firstItem="3ae-Qn-llh" firstAttribute="top" secondItem="iAl-ff-skU" secondAttribute="bottom" id="mwV-zq-iVp"/>
<constraint firstItem="iN7-lf-GS3" firstAttribute="bottom" secondItem="iAl-ff-skU" secondAttribute="bottom" id="o0D-wq-Ew9"/>
<constraint firstItem="iN7-lf-GS3" firstAttribute="trailing" secondItem="3ae-Qn-llh" secondAttribute="trailing" id="oT6-TL-SV4"/> <constraint firstItem="iN7-lf-GS3" firstAttribute="trailing" secondItem="3ae-Qn-llh" secondAttribute="trailing" id="oT6-TL-SV4"/>
<constraint firstAttribute="trailing" secondItem="3ae-Qn-llh" secondAttribute="trailing" id="qvo-A0-0im"/> <constraint firstAttribute="trailing" secondItem="3ae-Qn-llh" secondAttribute="trailing" id="qvo-A0-0im"/>
<constraint firstItem="1XB-6S-dGV" firstAttribute="top" secondItem="iN7-lf-GS3" secondAttribute="top" id="uz5-3l-eKb"/> <constraint firstItem="1XB-6S-dGV" firstAttribute="top" secondItem="iN7-lf-GS3" secondAttribute="top" id="uz5-3l-eKb"/>
@@ -210,14 +283,15 @@
<exclude reference="o0D-wq-Ew9"/> <exclude reference="o0D-wq-Ew9"/>
<exclude reference="oT6-TL-SV4"/> <exclude reference="oT6-TL-SV4"/>
<exclude reference="KyF-sn-SYG"/> <exclude reference="KyF-sn-SYG"/>
<exclude reference="SB2-jE-rZX"/>
<exclude reference="SI9-hB-Om4"/> <exclude reference="SI9-hB-Om4"/>
<exclude reference="WSU-eO-T8S"/> <exclude reference="WSU-eO-T8S"/>
<exclude reference="efn-u4-JYI"/> <exclude reference="efn-u4-JYI"/>
<exclude reference="fxU-4n-vS8"/> <exclude reference="fxU-4n-vS8"/>
<exclude reference="48i-EM-6px"/>
<exclude reference="JSj-x6-uUy"/> <exclude reference="JSj-x6-uUy"/>
<exclude reference="Ojd-xl-Edq"/> <exclude reference="Ojd-xl-Edq"/>
<exclude reference="T5g-Sq-0j2"/> <exclude reference="T5g-Sq-0j2"/>
<exclude reference="mwV-zq-iVp"/>
<exclude reference="qvo-A0-0im"/> <exclude reference="qvo-A0-0im"/>
</mask> </mask>
</variation> </variation>
@@ -233,7 +307,6 @@
<include reference="WSU-eO-T8S"/> <include reference="WSU-eO-T8S"/>
<include reference="efn-u4-JYI"/> <include reference="efn-u4-JYI"/>
<include reference="fxU-4n-vS8"/> <include reference="fxU-4n-vS8"/>
<exclude reference="48i-EM-6px"/>
<exclude reference="JSj-x6-uUy"/> <exclude reference="JSj-x6-uUy"/>
<include reference="Ojd-xl-Edq"/> <include reference="Ojd-xl-Edq"/>
<include reference="T5g-Sq-0j2"/> <include reference="T5g-Sq-0j2"/>
@@ -245,23 +318,26 @@
<include reference="AoD-6m-Zah"/> <include reference="AoD-6m-Zah"/>
<include reference="H2b-Bw-SPo"/> <include reference="H2b-Bw-SPo"/>
<include reference="KyF-sn-SYG"/> <include reference="KyF-sn-SYG"/>
<include reference="SB2-jE-rZX"/>
<include reference="SI9-hB-Om4"/> <include reference="SI9-hB-Om4"/>
<include reference="48i-EM-6px"/>
<include reference="JSj-x6-uUy"/> <include reference="JSj-x6-uUy"/>
<include reference="mwV-zq-iVp"/>
<include reference="qvo-A0-0im"/> <include reference="qvo-A0-0im"/>
</mask> </mask>
</variation> </variation>
</view> </view>
<navigationItem key="navigationItem" id="xDt-o1-FZQ"/> <navigationItem key="navigationItem" id="xDt-o1-FZQ"/>
<connections> <connections>
<outlet property="autoRefreshToggle" destination="EWJ-Yo-CtW" id="YoG-qo-G5G"/>
<outlet property="collectionView" destination="hWP-3N-RUn" id="RFo-DP-uPX"/> <outlet property="collectionView" destination="hWP-3N-RUn" id="RFo-DP-uPX"/>
<outlet property="colourView" destination="3ae-Qn-llh" id="do8-yi-0xg"/> <outlet property="colourView" destination="3ae-Qn-llh" id="do8-yi-0xg"/>
<outlet property="defaultSegments" destination="omP-RH-Hlh" id="hVo-ND-9EG"/> <outlet property="defaultSegments" destination="DPm-52-1Ww" id="4C8-tU-r8F"/>
<outlet property="inputsView" destination="iAl-ff-skU" id="6a4-Dz-Lch"/> <outlet property="inputsView" destination="iAl-ff-skU" id="6a4-Dz-Lch"/>
<outlet property="orderingSegments" destination="ol8-tW-I69" id="gKp-bt-Up7"/>
<outlet property="textToolbar" destination="cDy-2Q-2zk" id="UlY-Aa-f41"/> <outlet property="textToolbar" destination="cDy-2Q-2zk" id="UlY-Aa-f41"/>
<outlet property="txtClasses" destination="bCV-w1-hVY" id="lDD-NQ-f8f"/> <outlet property="txtClasses" destination="gOX-RF-Brg" id="fhm-pP-s7F"/>
<outlet property="txtCourses" destination="69O-Fo-TQF" id="AC7-pO-Jms"/> <outlet property="txtCourses" destination="EDB-Mm-gGh" id="GbC-4F-MOa"/>
<outlet property="txtName" destination="TpM-Mz-EpI" id="W0o-NR-E96"/> <outlet property="txtName" destination="ZCm-7a-IUx" id="Y3J-02-nMZ"/>
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fIE-1y-qpc" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="fIE-1y-qpc" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -504,7 +580,6 @@ If you have logged in successfully, but the setup does not continue, please go b
<!--Navigation Controller--> <!--Navigation Controller-->
<scene sceneID="1iA-SY-pPa"> <scene sceneID="1iA-SY-pPa">
<objects> <objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="43X-Sp-rFd" userLabel="First Responder" sceneMemberID="firstResponder"/>
<navigationController storyboardIdentifier="FirstTime" id="Jo3-et-Mdy" sceneMemberID="viewController"> <navigationController storyboardIdentifier="FirstTime" id="Jo3-et-Mdy" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" largeTitles="YES" id="Vmw-90-CHR"> <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" largeTitles="YES" id="Vmw-90-CHR">
<rect key="frame" x="0.0" y="44" width="414" height="96"/> <rect key="frame" x="0.0" y="44" width="414" height="96"/>
@@ -514,6 +589,7 @@ If you have logged in successfully, but the setup does not continue, please go b
<segue destination="rnZ-JC-kBT" kind="relationship" relationship="rootViewController" id="72E-26-83i"/> <segue destination="rnZ-JC-kBT" kind="relationship" relationship="rootViewController" id="72E-26-83i"/>
</connections> </connections>
</navigationController> </navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="43X-Sp-rFd" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects> </objects>
<point key="canvasLocation" x="2608" y="884"/> <point key="canvasLocation" x="2608" y="884"/>
</scene> </scene>
@@ -682,7 +758,7 @@ Tell me your name.</string>
<rect key="frame" x="0.0" y="140" width="414" height="722"/> <rect key="frame" x="0.0" y="140" width="414" height="722"/>
<color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<wkWebViewConfiguration key="configuration" allowsAirPlayForMediaPlayback="NO" allowsPictureInPictureMediaPlayback="NO"> <wkWebViewConfiguration key="configuration" allowsAirPlayForMediaPlayback="NO" allowsPictureInPictureMediaPlayback="NO">
<dataDetectorTypes key="dataDetectorTypes"/> <dataDetectorTypes key="dataDetectorTypes" none="YES"/>
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/> <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
<wkPreferences key="preferences"/> <wkPreferences key="preferences"/>
</wkWebViewConfiguration> </wkWebViewConfiguration>
@@ -23,6 +23,8 @@ class CustomizationViewController: UIViewController, UICollectionViewDataSource,
@IBOutlet weak var txtCourses: UITextField! @IBOutlet weak var txtCourses: UITextField!
@IBOutlet weak var defaultSegments: UISegmentedControl! @IBOutlet weak var defaultSegments: UISegmentedControl!
@IBOutlet weak var textToolbar: UIToolbar! @IBOutlet weak var textToolbar: UIToolbar!
@IBOutlet weak var orderingSegments: UISegmentedControl!
@IBOutlet weak var autoRefreshToggle: UISwitch!
@IBOutlet weak var inputsView: UIView! @IBOutlet weak var inputsView: UIView!
@IBOutlet weak var colourView: UIView! @IBOutlet weak var colourView: UIView!
@@ -39,6 +41,10 @@ class CustomizationViewController: UIViewController, UICollectionViewDataSource,
self.present(self.df.getInfoAlert(for: "course"), animated: true) self.present(self.df.getInfoAlert(for: "course"), animated: true)
} }
@IBAction func orderHelpButton(_ sender: UIButton) {
self.present(self.df.getInfoAlert(for: "order"), animated: true)
}
func textFieldDidBeginEditing(_ textField: UITextField) { func textFieldDidBeginEditing(_ textField: UITextField) {
textField.inputAccessoryView = textToolbar textField.inputAccessoryView = textToolbar
} }
@@ -56,6 +62,8 @@ class CustomizationViewController: UIViewController, UICollectionViewDataSource,
self.prefs.set(self.txtClasses.text, forKey: "classes") self.prefs.set(self.txtClasses.text, forKey: "classes")
self.prefs.set(self.txtCourses.text, forKey: "courses") self.prefs.set(self.txtCourses.text, forKey: "courses")
self.prefs.set(self.defaultSegments.selectedSegmentIndex, forKey: "default-plan") self.prefs.set(self.defaultSegments.selectedSegmentIndex, forKey: "default-plan")
self.prefs.set(self.orderingSegments.selectedSegmentIndex == 1, forKey: "original_sorting")
self.prefs.set(self.autoRefreshToggle.isOn, forKey: "auto_refresh")
self.prefs.synchronize() self.prefs.synchronize()
self.dismiss(animated: true, completion: nil) self.dismiss(animated: true, completion: nil)
@@ -72,6 +80,14 @@ class CustomizationViewController: UIViewController, UICollectionViewDataSource,
self.txtClasses.text = prefs.string(forKey: "classes") self.txtClasses.text = prefs.string(forKey: "classes")
self.txtCourses.text = prefs.string(forKey: "courses") self.txtCourses.text = prefs.string(forKey: "courses")
self.defaultSegments.selectedSegmentIndex = prefs.integer(forKey: "default-plan") self.defaultSegments.selectedSegmentIndex = prefs.integer(forKey: "default-plan")
var order: Int
if self.prefs.bool(forKey: "original_sorting") {
order = 1
} else {
order = 0
}
self.orderingSegments.selectedSegmentIndex = order
self.autoRefreshToggle.isOn = self.prefs.bool(forKey: "auto_refresh")
NotificationCenter.default.addObserver(self, selector: #selector(loadList), name: NSNotification.Name(rawValue: "load"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(loadList), name: NSNotification.Name(rawValue: "load"), object: nil)
} }
+8
View File
@@ -20,6 +20,12 @@ class DataFetcher {
let prefs = UserDefaults.standard let prefs = UserDefaults.standard
let juniors = ["5", "6", "7", "8", "9"] let juniors = ["5", "6", "7", "8", "9"]
var shouldRefresh: Bool
init() {
shouldRefresh = self.prefs.bool(forKey: "auto_refresh")
}
let substitutions = Table("substitutions") let substitutions = Table("substitutions")
let personal = Table("personal") let personal = Table("personal")
let information = Table("information") let information = Table("information")
@@ -136,7 +142,9 @@ class DataFetcher {
return -30 return -30
} else if a == "1" || a == "2" { } else if a == "1" || a == "2" {
if group.count > 1 { if group.count > 1 {
let b = Int(String(group[group.index(group.startIndex, offsetBy: 1)...group.index(group.startIndex, offsetBy: 1)])) let b = Int(String(group[group.index(group.startIndex, offsetBy: 1)...group.index(group.startIndex, offsetBy: 1)]))
if b == nil { if b == nil {
return 0 return 0
} else { } else {
+1 -1
View File
@@ -34,7 +34,7 @@ class FirstTimeViewController: UIViewController {
self.prefs.set(self.courseTextField.text, forKey: "courses") self.prefs.set(self.courseTextField.text, forKey: "courses")
self.prefs.set(self.defaultPlanSegmentedControl.selectedSegmentIndex, forKey: "default-plan") self.prefs.set(self.defaultPlanSegmentedControl.selectedSegmentIndex, forKey: "default-plan")
self.prefs.set(true, forKey: "setup_finished") self.prefs.set(true, forKey: "setup_finished")
self.prefs.synchronize() self.prefs.set(true, forKey: "auto_refresh")
if let s = storyboard?.instantiateViewController(withIdentifier: "AppTabBarController") as? CustomTabBarController { if let s = storyboard?.instantiateViewController(withIdentifier: "AppTabBarController") as? CustomTabBarController {
self.present(s, animated: true) self.present(s, animated: true)
+5 -1
View File
@@ -63,7 +63,11 @@ class MenuViewController : UICollectionViewController, UICollectionViewDelegateM
@objc private func objDoAsync(_ sender: Any) { @objc private func objDoAsync(_ sender: Any) {
df.doAsync(do: "menu") { menuItems in df.doAsync(do: "menu") { menuItems in
self.items = menuItems as! [String] self.items = menuItems as! [String]
self.collectionView.reloadData()
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
self.collectionView.reloadData()
}
self.refreshControl.endRefreshing() self.refreshControl.endRefreshing()
self.df.setTabBarBadge(for: self.tabBarController?.tabBar.items) self.df.setTabBarBadge(for: self.tabBarController?.tabBar.items)
} }
+10 -5
View File
@@ -30,7 +30,6 @@ class PlanViewController : UICollectionViewController, UICollectionViewDelegateM
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
if !self.prefs.bool(forKey: "logged_in") { if !self.prefs.bool(forKey: "logged_in") {
if let s = storyboard?.instantiateViewController(withIdentifier: "Login") as? UINavigationController { if let s = storyboard?.instantiateViewController(withIdentifier: "Login") as? UINavigationController {
self.present(s, animated: true) self.present(s, animated: true)
@@ -47,7 +46,7 @@ class PlanViewController : UICollectionViewController, UICollectionViewDelegateM
Messaging.messaging().subscribe(toTopic: "substitutions-ios") Messaging.messaging().subscribe(toTopic: "substitutions-ios")
Messaging.messaging().subscribe(toTopic: "substitutions-broadcast") Messaging.messaging().subscribe(toTopic: "substitutions-broadcast")
Crashlytics.sharedInstance().setUserIdentifier(UserDefaults.standard.string(forKey: "username")) Crashlytics.sharedInstance().setUserIdentifier(UserDefaults.standard.string(forKey: "username"))
// check if these can be put in AppDelegate // TODO: check if these can be put in AppDelegate
} }
view.addSubview(collectionView) view.addSubview(collectionView)
@@ -57,7 +56,7 @@ class PlanViewController : UICollectionViewController, UICollectionViewDelegateM
collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor), collectionView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor), collectionView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
collectionView.topAnchor.constraint(equalTo: view.superview!.topAnchor), collectionView.topAnchor.constraint(equalTo: view.superview!.topAnchor),
collectionView.bottomAnchor.constraint(equalTo: view.bottomAnchor), collectionView.bottomAnchor.constraint(equalTo: view.superview!.bottomAnchor),
]) ])
collectionView.register(UINib(nibName: "PlanViewCell", bundle: nil), forCellWithReuseIdentifier: identifier) collectionView.register(UINib(nibName: "PlanViewCell", bundle: nil), forCellWithReuseIdentifier: identifier)
collectionView.dataSource = self collectionView.dataSource = self
@@ -74,14 +73,20 @@ class PlanViewController : UICollectionViewController, UICollectionViewDelegateM
refreshControl.attributedTitle = NSAttributedString(string: getRefreshViewString()) refreshControl.attributedTitle = NSAttributedString(string: getRefreshViewString())
self.tabBarController?.delegate = self self.tabBarController?.delegate = self
self.substs = getFromDatabase() self.substs = self.getFromDatabase()
self.collectionView.reloadData() self.collectionView.reloadData()
if self.df.shouldRefresh {
self.collectionView.setContentOffset(CGPoint(x: 0, y: -self.refreshControl.frame.size.height), animated: true)
self.refreshControl.beginRefreshing()
self.refreshControl.sendActions(for: .valueChanged)
self.df.shouldRefresh = false
}
} }
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.extendedLayoutIncludesOpaqueBars = true
self.collectionView.contentInsetAdjustmentBehavior = .always self.collectionView.contentInsetAdjustmentBehavior = .always
self.df.setTabBarBadge(for: self.tabBarController?.tabBar.items) self.df.setTabBarBadge(for: self.tabBarController?.tabBar.items)
} }
+2
View File
@@ -79,5 +79,7 @@
"enter_grade_title" = "Wie du deine Klasse eintragen kannst"; "enter_grade_title" = "Wie du deine Klasse eintragen kannst";
"enter_course_title" = "Wie du deine Kurse eintragen kannst"; "enter_course_title" = "Wie du deine Kurse eintragen kannst";
"enter_order_title" = "Informationen über Sortierweisen";
"enter_grade_help" = "Trage deine derzeitige Klasse ein, damit sie in deinem persönlichen Plan auftaucht.\n\nAnmerkung:\n\nIn der Mittelstufe müssen Nummer und Buchstabe zusammen geschrieben werden, Beispiel: \"5a\".\n\nIn der E-Phase müssen diese durch ein Leerzeichen getrennt werden, Beispiel: \"18 a\".\n\nIn der Q1/Q2 sollen nur die Nummern eingetragen werden, Beispiel: \"17\".\n\nMehrere Klassen können nur eingetragen werden, wenn keine Kurse eingetragen sind."; "enter_grade_help" = "Trage deine derzeitige Klasse ein, damit sie in deinem persönlichen Plan auftaucht.\n\nAnmerkung:\n\nIn der Mittelstufe müssen Nummer und Buchstabe zusammen geschrieben werden, Beispiel: \"5a\".\n\nIn der E-Phase müssen diese durch ein Leerzeichen getrennt werden, Beispiel: \"18 a\".\n\nIn der Q1/Q2 sollen nur die Nummern eingetragen werden, Beispiel: \"17\".\n\nMehrere Klassen können nur eingetragen werden, wenn keine Kurse eingetragen sind.";
"enter_course_help" = "Trag die Kürzel für die Kurse ein, welche in deinem persönlichen Plan auftauchen sollen. Du kannst diese auf deinem Stundenplan finden.\n\nHier sind einige Beispiele:\n\nMathe in der 5. Klasse (Mittelstufe) wäre MAT.\n\nDer Englisch-Profilkurs in der E-Phase könnte ENP1 sein.\n\nDer Bio-Grundkurs in der Q1 ist z.B. bio1.\n\nMeist müssen Kurse für Mittelstufenschüler nicht eingetragen werden.\nTrenne mehrere Kurse mit Leerzeichen, Kommas sind optional.\nGroß- und Kleinschreibung wird beachtet."; "enter_course_help" = "Trag die Kürzel für die Kurse ein, welche in deinem persönlichen Plan auftauchen sollen. Du kannst diese auf deinem Stundenplan finden.\n\nHier sind einige Beispiele:\n\nMathe in der 5. Klasse (Mittelstufe) wäre MAT.\n\nDer Englisch-Profilkurs in der E-Phase könnte ENP1 sein.\n\nDer Bio-Grundkurs in der Q1 ist z.B. bio1.\n\nMeist müssen Kurse für Mittelstufenschüler nicht eingetragen werden.\nTrenne mehrere Kurse mit Leerzeichen, Kommas sind optional.\nGroß- und Kleinschreibung wird beachtet.";
"enter_order_help" = "Du kannst zwischen zwei Sortierweisen auswählen, welche die Reihenfolge der Einträge auf dem Vertretungsplan bestimmen.\n\nStandardmäßig ist \'App-spezifisch\' ausgewählt; dies bietet einen konsistenten Plan sortiert nach Klassen, dann nach Stunden.\n\n\'Website-Original\' bietet die Original-Reihenfolge der Website. Diese ist jedoch nicht konsistent, weswegen \'App-spezifisch\' standardmäßig ausgewählt ist.";
+20
View File
@@ -109,3 +109,23 @@
/* Class = "UIBarButtonItem"; title = "Customize"; ObjectID = "zsF-Jh-U3n"; */ /* Class = "UIBarButtonItem"; title = "Customize"; ObjectID = "zsF-Jh-U3n"; */
"zsF-Jh-U3n.title" = "Anpassen"; "zsF-Jh-U3n.title" = "Anpassen";
"ZCm-7a-IUx.placeholder" = "Dein Name";
"gOX-RF-Brg.placeholder" = "Deine Klasse";
"EDB-Mm-gGh.placeholder" = "Deine Kurse";
"JMH-JV-eMe.text" = "Standardplan";
"DPm-52-1Ww.segmentTitles[0]" = "Allgemein";
"DPm-52-1Ww.segmentTitles[1]" = "Persönlich";
"3iB-va-Cjs.text" = "Sortierweise";
"ol8-tW-I69.segmentTitles[0]" = "App-spezifisch";
"ol8-tW-I69.segmentTitles[1]" = "Website-Original";
"YlM-R8-zk5.text" = "Aktualisiere Plan automatisch";
+2
View File
@@ -80,5 +80,7 @@
"enter_grade_title" = "How to enter your grade"; "enter_grade_title" = "How to enter your grade";
"enter_course_title" = "How to enter your courses"; "enter_course_title" = "How to enter your courses";
"enter_order_title" = "Information on ordering systems";
"enter_grade_help" = "Enter your current grade to have it appear in your personal plan.\n\nNote:\n\nIn junior phase, put the number and letter together, as in \"5a\".\n\nIn E-Phase, separate them by a space, as in \"18 a\".\n\nIn Q1/Q2, only put in the number, as in \"17\".\n\nMultiple grades can only be entered when no courses have been entered."; "enter_grade_help" = "Enter your current grade to have it appear in your personal plan.\n\nNote:\n\nIn junior phase, put the number and letter together, as in \"5a\".\n\nIn E-Phase, separate them by a space, as in \"18 a\".\n\nIn Q1/Q2, only put in the number, as in \"17\".\n\nMultiple grades can only be entered when no courses have been entered.";
"enter_course_help" = "You need to enter the course abbreviation for every course you want in your personal plan. You can find them on your time table.\n\nHere\'s a few examples:\n\nMathematics in 5th grade (juniors) would be MAT.\n\nAdvanced English in E-Phase (seniors) for the English profile may be ENP1.\n\nBasic Biology in Q1 could be bio1.\n\nIn most cases, entering courses while in junior phase is redundant.\nSeparate multiple courses by spaces, commas are optional.\nCapitalisation is required."; "enter_course_help" = "You need to enter the course abbreviation for every course you want in your personal plan. You can find them on your time table.\n\nHere\'s a few examples:\n\nMathematics in 5th grade (juniors) would be MAT.\n\nAdvanced English in E-Phase (seniors) for the English profile may be ENP1.\n\nBasic Biology in Q1 could be bio1.\n\nIn most cases, entering courses while in junior phase is redundant.\nSeparate multiple courses by spaces, commas are optional.\nCapitalisation is required.";
"enter_order_help" = "You may pick between two ordering systems that dictate the order in which the items on the substitution plan will appear in.\n\nThe default \'app-specific\' is an algorithm implemented in this app that provides a consistently-sorted substitution plan ordered just like the substitution plan on the website used to; sorted by classes, then by time.\n\n\'Website original\' offers the items on the substitution plan just like they\'re presented on the school website, but since these are not guaranteed to be consistent, \'app-specific\' is picked by default.";