From f0c954c1051408ef53c26d5221082250dad12f2c Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Wed, 21 Nov 2018 22:35:59 -0500 Subject: [PATCH] Set up initial UI base - created `MainMenuInterfaceController` to serve as class for the main menu - placed and set up buttons to direct to Accounts section and Wellness section - added `WKInterfaceController` as a destination for each of the button segues --- .../Base.lproj/Interface.storyboard | 59 ++++++++++++++++++- .../MainMenuInterfaceController.swift | 31 ++++++++++ .../project.pbxproj | 12 ++-- 3 files changed, 96 insertions(+), 6 deletions(-) create mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/MainMenuInterfaceController.swift diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard index 48b3384..003d153 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard +++ b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard @@ -1,5 +1,5 @@ - + @@ -8,5 +8,60 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/MainMenuInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/MainMenuInterfaceController.swift new file mode 100644 index 0000000..b942f95 --- /dev/null +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/MainMenuInterfaceController.swift @@ -0,0 +1,31 @@ +// +// MainMenuInterfaceController.swift +// SynchronyFinancial WatchKit Extension +// +// Created by Alan Maynard on 11/21/18. +// Copyright © 2018 Alan Maynard. All rights reserved. +// + +import WatchKit +import Foundation + + +class MainMenuInterfaceController: WKInterfaceController { + + override func awake(withContext context: Any?) { + super.awake(withContext: context) + + // Configure interface objects here. + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + } + + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + } + +} diff --git a/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj b/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj index a968053..9eb5e6b 100644 --- a/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj +++ b/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj @@ -7,13 +7,14 @@ objects = { /* Begin PBXBuildFile section */ + 673F396E21A644570051469E /* MainMenuInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673F396C21A644460051469E /* MainMenuInterfaceController.swift */; }; + 673F397021A652A00051469E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 673F396F21A652A00051469E /* Assets.xcassets */; }; 67BAC269219E254700713FEF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67BAC268219E254700713FEF /* AppDelegate.swift */; }; 67BAC26E219E254700713FEF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC26C219E254700713FEF /* Main.storyboard */; }; 67BAC270219E254800713FEF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC26F219E254800713FEF /* Assets.xcassets */; }; 67BAC273219E254800713FEF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC271219E254800713FEF /* LaunchScreen.storyboard */; }; 67BAC278219E254800713FEF /* SynchronyFinancial WatchKit App.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 67BAC277219E254800713FEF /* SynchronyFinancial WatchKit App.app */; }; 67BAC27E219E254800713FEF /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC27C219E254800713FEF /* Interface.storyboard */; }; - 67BAC280219E254800713FEF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC27F219E254800713FEF /* Assets.xcassets */; }; 67BAC287219E254900713FEF /* SynchronyFinancial WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 67BAC286219E254900713FEF /* SynchronyFinancial WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 67BAC28E219E254900713FEF /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67BAC28D219E254900713FEF /* ExtensionDelegate.swift */; }; 67BAC292219E254900713FEF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC291219E254900713FEF /* Assets.xcassets */; }; @@ -62,6 +63,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 673F396C21A644460051469E /* MainMenuInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuInterfaceController.swift; sourceTree = ""; }; + 673F396F21A652A00051469E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 67BAC265219E254700713FEF /* SynchronyFinancial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SynchronyFinancial.app; sourceTree = BUILT_PRODUCTS_DIR; }; 67BAC268219E254700713FEF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 67BAC26D219E254700713FEF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -70,7 +73,6 @@ 67BAC274219E254800713FEF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67BAC277219E254800713FEF /* SynchronyFinancial WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SynchronyFinancial WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 67BAC27D219E254800713FEF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; - 67BAC27F219E254800713FEF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 67BAC281219E254800713FEF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67BAC286219E254900713FEF /* SynchronyFinancial WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "SynchronyFinancial WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 67BAC28D219E254900713FEF /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; @@ -132,7 +134,7 @@ isa = PBXGroup; children = ( 67BAC27C219E254800713FEF /* Interface.storyboard */, - 67BAC27F219E254800713FEF /* Assets.xcassets */, + 673F396F21A652A00051469E /* Assets.xcassets */, 67BAC281219E254800713FEF /* Info.plist */, ); path = "SynchronyFinancial WatchKit App"; @@ -141,6 +143,7 @@ 67BAC28A219E254900713FEF /* SynchronyFinancial WatchKit Extension */ = { isa = PBXGroup; children = ( + 673F396C21A644460051469E /* MainMenuInterfaceController.swift */, 67BAC28D219E254900713FEF /* ExtensionDelegate.swift */, 67BAC291219E254900713FEF /* Assets.xcassets */, 67BAC293219E254900713FEF /* Info.plist */, @@ -260,7 +263,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 67BAC280219E254800713FEF /* Assets.xcassets in Resources */, + 673F397021A652A00051469E /* Assets.xcassets in Resources */, 67BAC27E219E254800713FEF /* Interface.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -289,6 +292,7 @@ buildActionMask = 2147483647; files = ( 67BAC28E219E254900713FEF /* ExtensionDelegate.swift in Sources */, + 673F396E21A644570051469E /* MainMenuInterfaceController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };