diff --git a/DesignStudioExpress.xcodeproj/project.pbxproj b/DesignStudioExpress.xcodeproj/project.pbxproj index 9ab61bf..a914bbf 100644 --- a/DesignStudioExpress.xcodeproj/project.pbxproj +++ b/DesignStudioExpress.xcodeproj/project.pbxproj @@ -9,7 +9,6 @@ /* Begin PBXBuildFile section */ DE9CC0FF2AB206A55D253AC2 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAF9E289780C23ADD06A8363 /* Pods.framework */; }; E421C4161BF164AD003F9D8A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E421C4151BF164AD003F9D8A /* AppDelegate.swift */; }; - E421C4181BF164AD003F9D8A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E421C4171BF164AD003F9D8A /* ViewController.swift */; }; E421C41B1BF164AD003F9D8A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E421C4191BF164AD003F9D8A /* Main.storyboard */; }; E421C41D1BF164AD003F9D8A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E421C41C1BF164AD003F9D8A /* Assets.xcassets */; }; E421C4201BF164AD003F9D8A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E421C41E1BF164AD003F9D8A /* LaunchScreen.storyboard */; }; @@ -21,9 +20,12 @@ E429AF5D1BF5404200AE4DA7 /* BaseUIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E429AF5C1BF5404200AE4DA7 /* BaseUIViewController.swift */; }; E429AF651BF64DD300AE4DA7 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E429AF641BF64DD300AE4DA7 /* HomeViewController.swift */; }; E429AF691BF6619200AE4DA7 /* MGSwiteTableCellCentered.swift in Sources */ = {isa = PBXBuildFile; fileRef = E429AF681BF6619200AE4DA7 /* MGSwiteTableCellCentered.swift */; }; + E42DD3271BFE68380026390E /* DesignStudioStyleCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = E42DD3261BFE68380026390E /* DesignStudioStyleCustomization.swift */; }; E45128F81BF29E09002AFC8A /* UIButtonRed.swift in Sources */ = {isa = PBXBuildFile; fileRef = E45128F71BF29E09002AFC8A /* UIButtonRed.swift */; }; E4607F261BF6A82C000C44C7 /* HomeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4607F251BF6A82C000C44C7 /* HomeViewModel.swift */; }; E4766B4D1BF2A8550021059F /* UIButtonLightBlue.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4766B4C1BF2A8550021059F /* UIButtonLightBlue.swift */; }; + E49F45D91BFD468100F32AE9 /* ChallengesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E49F45D81BFD468100F32AE9 /* ChallengesViewController.swift */; }; + E49F45DC1BFE443B00F32AE9 /* StyledNavigationBarProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = E49F45DB1BFE443B00F32AE9 /* StyledNavigationBarProtocol.swift */; }; E4BFF0081BF3B33900E4255A /* Intro.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = E4BFF0071BF3B33900E4255A /* Intro.mp4 */; }; E4BFF00C1BF3BF1100E4255A /* UIButtonBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4BFF00B1BF3BF1100E4255A /* UIButtonBase.swift */; }; E4C113301BFA66CF00A7E1B3 /* NSAttributedStringExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4C1132F1BFA66CF00A7E1B3 /* NSAttributedStringExtension.swift */; }; @@ -50,7 +52,6 @@ AAF9E289780C23ADD06A8363 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E421C4121BF164AD003F9D8A /* DesignStudioExpress.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DesignStudioExpress.app; sourceTree = BUILT_PRODUCTS_DIR; }; E421C4151BF164AD003F9D8A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - E421C4171BF164AD003F9D8A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; E421C41A1BF164AD003F9D8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; E421C41C1BF164AD003F9D8A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; E421C41F1BF164AD003F9D8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; @@ -65,9 +66,12 @@ E429AF5C1BF5404200AE4DA7 /* BaseUIViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseUIViewController.swift; sourceTree = ""; }; E429AF641BF64DD300AE4DA7 /* HomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; E429AF681BF6619200AE4DA7 /* MGSwiteTableCellCentered.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MGSwiteTableCellCentered.swift; sourceTree = ""; }; + E42DD3261BFE68380026390E /* DesignStudioStyleCustomization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DesignStudioStyleCustomization.swift; sourceTree = ""; }; E45128F71BF29E09002AFC8A /* UIButtonRed.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIButtonRed.swift; sourceTree = ""; }; E4607F251BF6A82C000C44C7 /* HomeViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeViewModel.swift; sourceTree = ""; }; E4766B4C1BF2A8550021059F /* UIButtonLightBlue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIButtonLightBlue.swift; sourceTree = ""; }; + E49F45D81BFD468100F32AE9 /* ChallengesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChallengesViewController.swift; sourceTree = ""; }; + E49F45DB1BFE443B00F32AE9 /* StyledNavigationBarProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StyledNavigationBarProtocol.swift; sourceTree = ""; }; E4BFF0071BF3B33900E4255A /* Intro.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = Intro.mp4; sourceTree = ""; }; E4BFF00B1BF3BF1100E4255A /* UIButtonBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIButtonBase.swift; sourceTree = ""; }; E4C1132F1BFA66CF00A7E1B3 /* NSAttributedStringExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSAttributedStringExtension.swift; sourceTree = ""; }; @@ -137,6 +141,7 @@ E421C4141BF164AD003F9D8A /* DesignStudioExpress */ = { isa = PBXGroup; children = ( + E49F45DA1BFE442500F32AE9 /* Protocols */, E4FF2BBE1BF78DB200A3C732 /* Models */, E4607F241BF6A7B8000C44C7 /* ViewModels */, E429AF591BF5396C00AE4DA7 /* Extensions */, @@ -180,11 +185,20 @@ path = ViewModels; sourceTree = ""; }; + E49F45DA1BFE442500F32AE9 /* Protocols */ = { + isa = PBXGroup; + children = ( + E49F45DB1BFE443B00F32AE9 /* StyledNavigationBarProtocol.swift */, + ); + name = Protocols; + sourceTree = ""; + }; E4BFF0051BF3A4C300E4255A /* Resources */ = { isa = PBXGroup; children = ( E429AF571BF530B200AE4DA7 /* DesignStudioStyles.swift */, E4BFF0071BF3B33900E4255A /* Intro.mp4 */, + E42DD3261BFE68380026390E /* DesignStudioStyleCustomization.swift */, ); path = Resources; sourceTree = ""; @@ -194,9 +208,9 @@ children = ( E4BFF00F1BF3BF3300E4255A /* Subviews */, E421C4361BF279FE003F9D8A /* IntroViewController.swift */, - E421C4171BF164AD003F9D8A /* ViewController.swift */, E429AF641BF64DD300AE4DA7 /* HomeViewController.swift */, E4ECC4F01BF8E92C00834AD3 /* DetailDesignStudioViewController.swift */, + E49F45D81BFD468100F32AE9 /* ChallengesViewController.swift */, ); path = Views; sourceTree = ""; @@ -393,8 +407,8 @@ E429AF581BF530B200AE4DA7 /* DesignStudioStyles.swift in Sources */, E45128F81BF29E09002AFC8A /* UIButtonRed.swift in Sources */, E4C113321BFA855700A7E1B3 /* RealmSwiftExtension.swift in Sources */, - E421C4181BF164AD003F9D8A /* ViewController.swift in Sources */, E421C4161BF164AD003F9D8A /* AppDelegate.swift in Sources */, + E49F45D91BFD468100F32AE9 /* ChallengesViewController.swift in Sources */, E4ECC4F11BF8E92C00834AD3 /* DetailDesignStudioViewController.swift in Sources */, E429AF5B1BF539BC00AE4DA7 /* UIImageExtension.swift in Sources */, E4BFF00C1BF3BF1100E4255A /* UIButtonBase.swift in Sources */, @@ -403,11 +417,13 @@ E4607F261BF6A82C000C44C7 /* HomeViewModel.swift in Sources */, E4FF2BC01BF78DE500A3C732 /* DesignStudio.swift in Sources */, E4766B4D1BF2A8550021059F /* UIButtonLightBlue.swift in Sources */, + E42DD3271BFE68380026390E /* DesignStudioStyleCustomization.swift in Sources */, E429AF5D1BF5404200AE4DA7 /* BaseUIViewController.swift in Sources */, E4ECC4F31BF8EF1200834AD3 /* DetailDesignStudioViewModel.swift in Sources */, E4C113361BFBBE3B00A7E1B3 /* StringExtension.swift in Sources */, E429AF4E1BF3F65400AE4DA7 /* BaseUITabBarController.swift in Sources */, E429AF691BF6619200AE4DA7 /* MGSwiteTableCellCentered.swift in Sources */, + E49F45DC1BFE443B00F32AE9 /* StyledNavigationBarProtocol.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/Contents.json b/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/Contents.json new file mode 100644 index 0000000..8f4fa09 --- /dev/null +++ b/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "DS_Icon_big.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "DS_Icon_big@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "DS_Icon_big@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/DS_Icon_big.png b/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/DS_Icon_big.png new file mode 100644 index 0000000..9491658 Binary files /dev/null and b/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/DS_Icon_big.png differ diff --git a/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/DS_Icon_big@2x.png b/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/DS_Icon_big@2x.png new file mode 100644 index 0000000..ff0e8df Binary files /dev/null and b/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/DS_Icon_big@2x.png differ diff --git a/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/DS_Icon_big@3x.png b/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/DS_Icon_big@3x.png new file mode 100644 index 0000000..833386c Binary files /dev/null and b/DesignStudioExpress/Assets.xcassets/DS_Icon_big.imageset/DS_Icon_big@3x.png differ diff --git a/DesignStudioExpress/Base.lproj/Main.storyboard b/DesignStudioExpress/Base.lproj/Main.storyboard index 2e007ee..f1c7e64 100644 --- a/DesignStudioExpress/Base.lproj/Main.storyboard +++ b/DesignStudioExpress/Base.lproj/Main.storyboard @@ -229,10 +229,10 @@ - + - + @@ -507,16 +507,16 @@ - - - - - + + + + + @@ -529,16 +529,16 @@ - - - - - + + + + + @@ -636,10 +636,10 @@ - + - + @@ -647,12 +647,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -714,6 +872,7 @@ + diff --git a/DesignStudioExpress/Extensions/RealmSwiftExtension.swift b/DesignStudioExpress/Extensions/RealmSwiftExtension.swift index 4554582..3fa8738 100644 --- a/DesignStudioExpress/Extensions/RealmSwiftExtension.swift +++ b/DesignStudioExpress/Extensions/RealmSwiftExtension.swift @@ -10,7 +10,7 @@ import Foundation import RealmSwift extension Results { - // converts the Results object to and array + // converts the Results object to an array func toArray(ofType: T.Type) -> [T] { return (0.. MGSwiteTableCellCentered { // set the background image let image = UIImage(named: vm.getImageName(indexPath)) diff --git a/DesignStudioExpress/Views/Subviews/BaseUIViewController.swift b/DesignStudioExpress/Views/Subviews/BaseUIViewController.swift index 20b36c0..4dccef9 100644 --- a/DesignStudioExpress/Views/Subviews/BaseUIViewController.swift +++ b/DesignStudioExpress/Views/Subviews/BaseUIViewController.swift @@ -8,20 +8,24 @@ import UIKit -class BaseUIViewController: UIViewController { +class BaseUIViewController: UIViewController, StyledNavigationBarProtocol { override func viewDidLoad() { super.viewDidLoad() self.customizeNavBarStyle() } - private func customizeNavBarStyle() { + override func viewWillAppear(animated: Bool) { + super.viewWillAppear(animated) + self.customizeNavBarStyle() + } + + func customizeNavBarStyle() { // remove "Back" title from all back buttons let backButton = UIBarButtonItem(title: "", style: .Plain, target: nil, action: nil) self.navigationItem.backBarButtonItem = backButton - // set the color for the back arrow + // make navigation text and buttons white self.navigationController?.navigationBar.tintColor = DesignStudioStyles.white - self.navigationController?.navigationBar.barTintColor = DesignStudioStyles.primaryOrange } } \ No newline at end of file diff --git a/DesignStudioExpress/Views/ViewController.swift b/DesignStudioExpress/Views/ViewController.swift deleted file mode 100644 index 297ff8d..0000000 --- a/DesignStudioExpress/Views/ViewController.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// ViewController.swift -// DesignStudioExpress -// -// Created by Kristijan Perusko on 11/9/15. -// Copyright © 2015 Alexander Interactive. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - - -} -