Skip to content

Commit

Permalink
Cleaning up for #100 and fixed #91 alert view is now dismissed before…
Browse files Browse the repository at this point in the history
… presenting timer screen
  • Loading branch information
kperusko committed Feb 4, 2016
1 parent 2eff07c commit 9f82c24
Show file tree
Hide file tree
Showing 15 changed files with 373 additions and 361 deletions.
4 changes: 4 additions & 0 deletions Design Studio.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
E46A22081C010FE5004D5292 /* ChallengeDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E46A22071C010FE5004D5292 /* ChallengeDetailViewModel.swift */; };
E47294E71C00C9FF00E59587 /* UIButtonTransparent.swift in Sources */ = {isa = PBXBuildFile; fileRef = E47294E61C00C9FF00E59587 /* UIButtonTransparent.swift */; };
E4766B4D1BF2A8550021059F /* UIButtonLightBlue.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4766B4C1BF2A8550021059F /* UIButtonLightBlue.swift */; };
E48641461C63FAA70063D624 /* UIAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E48641451C63FAA70063D624 /* UIAlertController.swift */; };
E49F45D91BFD468100F32AE9 /* ChallengesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E49F45D81BFD468100F32AE9 /* ChallengesViewController.swift */; };
E49F45DC1BFE443B00F32AE9 /* StyledNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = E49F45DB1BFE443B00F32AE9 /* StyledNavigationBar.swift */; };
E4A4B4631C2372CC00D6664E /* UITableViewCellAddChallenge.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4A4B4621C2372CC00D6664E /* UITableViewCellAddChallenge.swift */; };
Expand Down Expand Up @@ -151,6 +152,7 @@
E46A22071C010FE5004D5292 /* ChallengeDetailViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChallengeDetailViewModel.swift; sourceTree = "<group>"; };
E47294E61C00C9FF00E59587 /* UIButtonTransparent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIButtonTransparent.swift; sourceTree = "<group>"; };
E4766B4C1BF2A8550021059F /* UIButtonLightBlue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIButtonLightBlue.swift; sourceTree = "<group>"; };
E48641451C63FAA70063D624 /* UIAlertController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIAlertController.swift; sourceTree = "<group>"; };
E49F45D81BFD468100F32AE9 /* ChallengesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChallengesViewController.swift; sourceTree = "<group>"; };
E49F45DB1BFE443B00F32AE9 /* StyledNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StyledNavigationBar.swift; sourceTree = "<group>"; };
E4A4B4621C2372CC00D6664E /* UITableViewCellAddChallenge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UITableViewCellAddChallenge.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -302,6 +304,7 @@
E4C113311BFA855700A7E1B3 /* RealmSwiftExtension.swift */,
E4C113351BFBBE3B00A7E1B3 /* StringExtension.swift */,
E429AF5A1BF539BC00AE4DA7 /* UIImageExtension.swift */,
E48641451C63FAA70063D624 /* UIAlertController.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -575,6 +578,7 @@
E42DD3301BFE98020026390E /* ChallengesViewModel.swift in Sources */,
E421C4371BF279FE003F9D8A /* IntroViewController.swift in Sources */,
E4EB7A951C271226003FADA3 /* UITableViewCellSettings.swift in Sources */,
E48641461C63FAA70063D624 /* UIAlertController.swift in Sources */,
E429AF581BF530B200AE4DA7 /* DesignStudioStyles.swift in Sources */,
E45128F81BF29E09002AFC8A /* UIButtonRed.swift in Sources */,
E47294E71C00C9FF00E59587 /* UIButtonTransparent.swift in Sources */,
Expand Down
37 changes: 19 additions & 18 deletions DesignStudioExpress/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="List_Page_Image" translatesAutoresizingMaskIntoConstraints="NO" id="DG7-Mo-fz8">
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="opU-bJ-Qrg">
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="opU-bJ-Qrg">
<rect key="frame" x="5" y="151" width="390" height="159"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PRO CHECKLIST" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9rc-NL-tGW" customClass="FXLabel">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="PRO CHECKLIST" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9rc-NL-tGW" customClass="FXLabel">
<rect key="frame" x="145" y="20" width="101" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="140" id="UuL-HU-r7C"/>
Expand All @@ -339,13 +339,14 @@
<exclude reference="UuL-HU-r7C"/>
</mask>
</variation>
<variation key="heightClass=regular-widthClass=compact">
<variation key="heightClass=regular-widthClass=compact" misplaced="YES">
<rect key="frame" x="131" y="0.0" width="140" height="18"/>
<mask key="constraints">
<include reference="UuL-HU-r7C"/>
</mask>
</variation>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FGD-ZV-0OF">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FGD-ZV-0OF">
<rect key="frame" x="20" y="48" width="350" height="91"/>
<string key="text">Set the tables with these design studio essentials.
Background music is optional.</string>
Expand Down Expand Up @@ -1079,16 +1080,16 @@ Sketching Templates</string>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" shouldIndentWhileEditing="NO" reuseIdentifier="photoCell" rowHeight="360" id="xBq-IG-bji">
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xBq-IG-bji" id="9dx-az-0Aq">
<rect key="frame" x="0.0" y="0.0" width="240" height="89"/>
<rect key="frame" x="0.0" y="0.0" width="240" height="359"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="DS_Home_BG_image" translatesAutoresizingMaskIntoConstraints="NO" id="V2g-i0-bgJ">
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9A3-rP-t9M">
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9A3-rP-t9M">
<rect key="frame" x="38" y="64" width="309" height="181"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="MY DESIGN STUDIOS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Toq-o8-L63" customClass="FXLabel">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="MY DESIGN STUDIOS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Toq-o8-L63" customClass="FXLabel">
<rect key="frame" x="64" y="20" width="196" height="21"/>
<constraints>
<constraint firstAttribute="width" constant="220" id="OW9-1Z-xff"/>
Expand Down Expand Up @@ -1174,14 +1175,14 @@ Sketching Templates</string>
<exclude reference="KVG-5r-6EQ"/>
</mask>
<mask key="constraints">
<exclude reference="9oI-sj-SlW"/>
<exclude reference="A9K-sw-Zdc"/>
<exclude reference="GaV-Zt-TUN"/>
<exclude reference="KJa-Lg-Gcv"/>
<exclude reference="1nr-Qp-eOr"/>
<exclude reference="Cvm-mU-U8G"/>
<exclude reference="evb-2V-EgV"/>
<exclude reference="xXg-hZ-63d"/>
<exclude reference="9oI-sj-SlW"/>
<exclude reference="A9K-sw-Zdc"/>
<exclude reference="GaV-Zt-TUN"/>
<exclude reference="KJa-Lg-Gcv"/>
<exclude reference="Gj0-fZ-5Bp"/>
<exclude reference="ZD0-Fx-7mu"/>
</mask>
Expand All @@ -1192,14 +1193,14 @@ Sketching Templates</string>
<include reference="KVG-5r-6EQ"/>
</mask>
<mask key="constraints">
<include reference="9oI-sj-SlW"/>
<include reference="A9K-sw-Zdc"/>
<include reference="GaV-Zt-TUN"/>
<include reference="KJa-Lg-Gcv"/>
<include reference="1nr-Qp-eOr"/>
<include reference="Cvm-mU-U8G"/>
<include reference="evb-2V-EgV"/>
<include reference="xXg-hZ-63d"/>
<include reference="9oI-sj-SlW"/>
<include reference="A9K-sw-Zdc"/>
<include reference="GaV-Zt-TUN"/>
<include reference="KJa-Lg-Gcv"/>
<include reference="Gj0-fZ-5Bp"/>
<include reference="ZD0-Fx-7mu"/>
</mask>
Expand Down Expand Up @@ -4671,10 +4672,10 @@ Sketching Templates</string>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Settings_Image" translatesAutoresizingMaskIntoConstraints="NO" id="S9R-OE-sve">
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1vj-cu-Yk3">
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1vj-cu-Yk3">
<rect key="frame" x="5" y="97" width="390" height="183"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SETTINGS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="61i-8S-Zuq" customClass="FXLabel">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="SETTINGS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="61i-8S-Zuq" customClass="FXLabel">
<rect key="frame" x="125" y="20" width="140" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="100" id="KDN-C7-8t5"/>
Expand All @@ -4698,7 +4699,7 @@ Sketching Templates</string>
</mask>
</variation>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Share, review or learn more about the nerds who built this." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aBR-Nh-LTf">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="Share, review or learn more about the nerds who built this." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aBR-Nh-LTf">
<rect key="frame" x="20" y="33" width="350" height="130"/>
<fontDescription key="fontDescription" name="Avenir-Light" family="Avenir" pointSize="22"/>
<color key="textColor" red="0.90823972230000005" green="0.92638683320000004" blue="0.93171715740000005" alpha="1" colorSpace="calibratedRGB"/>
Expand Down
18 changes: 18 additions & 0 deletions DesignStudioExpress/Extensions/UIAlertController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// UIAlertController.swift
// Design Studio
//
// Created by Kristijan Perusko on 2/4/16.
// Copyright © 2016 Alexander Interactive. All rights reserved.
//

extension UIAlertController {

static func createAlertController(title: String, message: String) -> UIAlertController {
let alertController = UIAlertController(title: title, message: message, preferredStyle: .Alert)
let okAction = UIAlertAction(title: "OK", style: .Default, handler: nil)
alertController.addAction(okAction)

return alertController
}
}
Loading

0 comments on commit 9f82c24

Please sign in to comment.