Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Commit

Permalink
Use UserPreference synchronization for iOS 7. Not required for iOS 8.…
Browse files Browse the repository at this point in the history
… Set constraints EULA modal view for older 3.5" displays.
  • Loading branch information
gsledbetter committed Jun 9, 2015
1 parent d1abd79 commit 839ef80
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 11 additions & 2 deletions StdTxGuide/StdTxGuide/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<webView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="W6q-y8-fgp">
<webView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="W6q-y8-fgp">
<rect key="frame" x="0.0" y="28" width="320" height="496"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</webView>
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ciu-0c-M22">
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ciu-0c-M22">
<rect key="frame" x="0.0" y="524" width="320" height="44"/>
<items>
<barButtonItem title="I Agree" id="RIT-Wj-Rzh">
Expand All @@ -175,6 +175,15 @@
</toolbar>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="W6q-y8-fgp" firstAttribute="top" secondItem="yvw-4f-knn" secondAttribute="bottom" constant="8" symbolic="YES" id="0do-tU-SzW"/>
<constraint firstItem="Ciu-0c-M22" firstAttribute="bottom" secondItem="TFi-tW-3nG" secondAttribute="top" id="4aB-ha-Pkq"/>
<constraint firstItem="W6q-y8-fgp" firstAttribute="leading" secondItem="hMN-9v-UV9" secondAttribute="leading" id="DPc-VQ-3sF"/>
<constraint firstItem="Ciu-0c-M22" firstAttribute="leading" secondItem="W6q-y8-fgp" secondAttribute="leading" id="I7F-CM-tk1"/>
<constraint firstAttribute="trailing" secondItem="Ciu-0c-M22" secondAttribute="trailing" id="l1w-uE-Z2b"/>
<constraint firstItem="W6q-y8-fgp" firstAttribute="trailing" secondItem="Ciu-0c-M22" secondAttribute="trailing" id="rFk-wh-aVM"/>
<constraint firstItem="Ciu-0c-M22" firstAttribute="top" secondItem="W6q-y8-fgp" secondAttribute="bottom" id="ypK-wS-hyO"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="EULA" id="fTR-mr-E2q"/>
<connections>
Expand Down
3 changes: 3 additions & 0 deletions StdTxGuide/StdTxGuide/ConditionViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ class ConditionViewController: UIViewController, UITableViewDelegate, UITableVie
} else {
performSegueWithIdentifier("showModalEula", sender: self)
userPrefs.setValue("true", forKey: "agreedToEula")
if (UIDevice.currentDevice().systemVersion as NSString).floatValue < 8.0 {
userPrefs.synchronize()
}
}


Expand Down

0 comments on commit 839ef80

Please sign in to comment.