Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

Commit

Permalink
CustomizAvatarView now goes directly to MapView.
Browse files Browse the repository at this point in the history
  • Loading branch information
identity2 committed Jul 30, 2017
1 parent 1c69f85 commit 25af9bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
22 changes: 13 additions & 9 deletions Powerup/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<connections>
<outlet property="StartButton" destination="S80-hG-Bup" id="BUd-iF-8Dk"/>
<segue destination="S3c-uW-lpA" kind="push" identifier="toMapView" id="Ck5-aV-1L2"/>
<segue destination="vCf-Jb-qhY" kind="modal" identifier="toNewAvatar" id="NfY-xP-4UP"/>
<segue destination="vCf-Jb-qhY" kind="push" identifier="toNewAvatar" id="NfY-xP-4UP"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="b5D-0F-CHK" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down Expand Up @@ -254,11 +254,14 @@
<outlet property="eyesExhibitionView" destination="pYj-SH-Ka6" id="x6t-QS-6Hv"/>
<outlet property="faceExhibitionView" destination="kqg-Mf-bYN" id="oqY-Se-Fpd"/>
<outlet property="hairExhibitionView" destination="VDB-d3-DiJ" id="22e-kW-RXo"/>
<segue destination="S3c-uW-lpA" kind="push" identifier="toMapScene" id="Vcg-vV-Did"/>
<segue destination="CP2-u9-bQu" kind="unwind" identifier="unwindToStartScene" unwindAction="unwindToStartWithUnwindSegue:" id="hIc-T8-YB3"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="KnS-W8-cZa" userLabel="First Responder" sceneMemberID="firstResponder"/>
<exit id="CP2-u9-bQu" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="-42" y="831"/>
<point key="canvasLocation" x="276" y="831"/>
</scene>
<!--ScenarioViewController-->
<scene sceneID="tne-QT-ifu">
Expand Down Expand Up @@ -302,7 +305,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Marcello" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6u7-zE-DVc">
<rect key="frame" x="498.5" y="270.5" width="88" height="24.5"/>
<rect key="frame" x="498" y="270.5" width="88" height="24.5"/>
<fontDescription key="fontDescription" name="Montserrat-Bold" family="Montserrat" pointSize="20"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
Expand Down Expand Up @@ -437,7 +440,7 @@
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
<exit id="tRn-hQ-WhV" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="1992" y="305"/>
<point key="canvasLocation" x="2258" y="304"/>
</scene>
<!--MiniGameViewController-->
<scene sceneID="b2Q-yH-u8Q">
Expand All @@ -459,7 +462,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="WKc-Ic-VMh" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1517" y="831"/>
<point key="canvasLocation" x="2012" y="831"/>
</scene>
<!--Shop View Controller-->
<scene sceneID="uGO-Kb-Jms">
Expand Down Expand Up @@ -915,7 +918,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="OKe-Du-9T9" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="741" y="831"/>
<point key="canvasLocation" x="1286" y="831"/>
</scene>
<!--Results View Controller-->
<scene sceneID="7iy-JJ-2EY">
Expand Down Expand Up @@ -1061,7 +1064,7 @@
<placeholder placeholderIdentifier="IBFirstResponder" id="kEs-g1-97C" userLabel="First Responder" sceneMemberID="firstResponder"/>
<exit id="AXo-70-yQg" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="2473.5" y="830.5"/>
<point key="canvasLocation" x="2742" y="831"/>
</scene>
<!--MapViewController-->
<scene sceneID="8zi-ZT-9cM">
Expand Down Expand Up @@ -1178,7 +1181,7 @@
<placeholder placeholderIdentifier="IBFirstResponder" id="OMF-eo-Ren" userLabel="First Responder" sceneMemberID="firstResponder"/>
<exit id="QuD-Og-rFX" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="740.5" y="303.5"/>
<point key="canvasLocation" x="952" y="304"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="cD8-wF-rc7">
Expand Down Expand Up @@ -1239,6 +1242,7 @@
<simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
<segue reference="0it-aH-Xs8"/>
<segue reference="Vcg-vV-Did"/>
<segue reference="HHh-kx-uKw"/>
</inferredMetricsTieBreakers>
</document>
10 changes: 6 additions & 4 deletions Powerup/CustomizeAvatarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,18 @@ class CustomizeAvatarViewController: UIViewController {
} catch _ {
let alert = UIAlertController(title: "Warning", message: "Failed to save avatar, please retry this action. If that doesn't help, try restaring or reinstalling the app.", preferredStyle: .alert)

// Dismiss the modal VC (so the app is back to Start View) when Ok Button is pressed.
let okButton = UIAlertAction(title: "OK", style: .cancel, handler: {action in self.dismiss(animated: true, completion: nil)})
// Unwind to Start View when Ok Button is pressed.
let okButton = UIAlertAction(title: "OK", style: .cancel, handler: {action in
self.performSegue(withIdentifier: "unwindToStartScene", sender: self)
})
alert.addAction(okButton)
self.present(alert, animated: true, completion: nil)

return
}

// Dismiss the modal VC
self.dismiss(animated: true, completion: nil)
// Perform Push segue to map scene.
performSegue(withIdentifier: "toMapScene", sender: self)
}

}

0 comments on commit 25af9bc

Please sign in to comment.