From 721afe8098a55d2b4b715af8f115240414e4b089 Mon Sep 17 00:00:00 2001 From: Tilun Date: Wed, 13 Feb 2019 17:31:57 -0500 Subject: [PATCH 01/11] set up the account table --- .../Base.lproj/Interface.storyboard | 39 +++++++++++++++++-- .../AccountCell.swift | 14 +++++++ .../AccountTableInterfaceController.swift | 32 +++++++++++++++ .../project.pbxproj | 36 ++++++++++------- 4 files changed, 103 insertions(+), 18 deletions(-) create mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountCell.swift create mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard index db708d7..53fc2af 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard +++ b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard @@ -51,21 +51,52 @@ + + + + + + + + + + + + + + +
+
+
+
+ +
@@ -90,13 +116,95 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPayEndInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPayEndInterfaceController.swift new file mode 100644 index 0000000..2170e44 --- /dev/null +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPayEndInterfaceController.swift @@ -0,0 +1,25 @@ +// +// AccPayEndInterfaceController.swift +// SynchronyFinancial +// +// Created by Monday on 2019/02/27. +// Copyright © 2019 Alan Maynard. All rights reserved. +// + +import Foundation +import WatchKit +class AccPayEndInterfaceController: WKInterfaceController { + + @IBAction func returnButton() { + } + 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 WatchKit Extension/AccPaym1InterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym1InterfaceController.swift new file mode 100644 index 0000000..6b4836c --- /dev/null +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym1InterfaceController.swift @@ -0,0 +1,23 @@ +// +// AccPaym1InterfaceController.swift +// SynchronyFinancial +// +// Created by Monday on 2019/02/27. +// Copyright © 2019 Alan Maynard. All rights reserved. +// + +import Foundation +import WatchKit +class AccPaym1InterfaceController: WKInterfaceController { + + 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 WatchKit Extension/AccPaym2InterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym2InterfaceController.swift new file mode 100644 index 0000000..a1018f3 --- /dev/null +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym2InterfaceController.swift @@ -0,0 +1,27 @@ +// +// AccPaym2InterfaceController.swift +// SynchronyFinancial WatchKit Extension +// +// Created by Monday on 2019/02/27. +// Copyright © 2019 Alan Maynard. All rights reserved. +// + +import Foundation +import WatchKit +class AccPaym2InterfaceController: WKInterfaceController { + + @IBOutlet weak var acctName: WKInterfaceLabel! + @IBOutlet weak var datePay: WKInterfaceLabel! + @IBAction func paymentButton2() { + } + 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 WatchKit Extension/AccountDetailCell.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailCell.swift new file mode 100644 index 0000000..e4a7ec3 --- /dev/null +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailCell.swift @@ -0,0 +1,16 @@ +// +// AccountDetailCell.swift +// SynchronyFinancial WatchKit Extension +// +// Created by Monday on 2019/02/19. +// Copyright © 2019 Alan Maynard. All rights reserved. +// +import WatchKit +import Foundation +class AccountDetailCell: NSObject { + @IBOutlet weak var Label: WKInterfaceLabel! + + @IBOutlet weak var payNowButton: WKInterfaceButton! + + +} diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountPaymentInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountPaymentInterfaceController.swift new file mode 100644 index 0000000..a8d3dfb --- /dev/null +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountPaymentInterfaceController.swift @@ -0,0 +1,31 @@ +// +// AccountPaymentInterfaceController.swift +// SynchronyFinancial WatchKit Extension +// +// Created by Monday on 2019/02/27. +// Copyright © 2019 Alan Maynard. All rights reserved. +// + +import Foundation +import WatchKit +class AccountPaymentInterfaceController: WKInterfaceController { + + + @IBOutlet weak var pay1label: WKInterfaceLabel! + + @IBAction func payButton() { + + } + + 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 WatchKit Extension/AccountTableInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift index 5aff266..a30fa7b 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift @@ -18,7 +18,8 @@ class AccountTableInterfaceController: WKInterfaceController { accountTable.setNumberOfRows(5, withRowType: "account") // Configure interface objects here. } - + + override func willActivate() { // This method is called when watch view controller is about to be visible to user super.willActivate() diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json index f84499b..aefef29 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Circular.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json index f84499b..aefef29 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Extra Large.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json index f84499b..aefef29 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Bezel.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json index f84499b..aefef29 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Circular.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json index f84499b..aefef29 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Corner.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json index f84499b..aefef29 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Graphic Large Rectangular.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json index f84499b..aefef29 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Modular.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json index f84499b..aefef29 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/Assets.xcassets/Complication.complicationset/Utilitarian.imageset/Contents.json @@ -5,10 +5,20 @@ "scale" : "2x", "screen-width" : "<=145" }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">161" + }, { "idiom" : "watch", "scale" : "2x", "screen-width" : ">145" + }, + { + "idiom" : "watch", + "scale" : "2x", + "screen-width" : ">183" } ], "info" : { diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/PaymentCell.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/PaymentCell.swift new file mode 100644 index 0000000..235778d --- /dev/null +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/PaymentCell.swift @@ -0,0 +1,13 @@ +// +// Payment.swift +// SynchronyFinancial WatchKit Extension +// +// Created by Monday on 2019/02/27. +// Copyright © 2019 Alan Maynard. All rights reserved. +// + +import Foundation +import WatchKit +class payment: NSObject { + +} diff --git a/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj b/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj index 2ea476f..d8e26c1 100644 --- a/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj +++ b/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj @@ -8,7 +8,17 @@ /* Begin PBXBuildFile section */ 281283568A34D3C5D9C7B383 /* libPods-SynchronyFinancial WatchKit Extension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAA6D46F907ADAABF49FD409 /* libPods-SynchronyFinancial WatchKit Extension.a */; }; - 48F243052214C58A00B9C894 /* AccountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48F243042214C58A00B9C894 /* AccountCell.swift */; }; + 48CFA6652226758A003B81FB /* PaymentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA6642226758A003B81FB /* PaymentCell.swift */; }; + 48CFA669222679B1003B81FB /* AccountPaymentInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA668222679B1003B81FB /* AccountPaymentInterfaceController.swift */; }; + 48CFA66A22267A34003B81FB /* AccountPaymentInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA668222679B1003B81FB /* AccountPaymentInterfaceController.swift */; }; + 48CFA66C22267BCC003B81FB /* AccPaym2InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA66B22267BCC003B81FB /* AccPaym2InterfaceController.swift */; }; + 48CFA66D22267BF0003B81FB /* AccPaym2InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA66B22267BCC003B81FB /* AccPaym2InterfaceController.swift */; }; + 48CFA66F22267C4D003B81FB /* AccPayEndInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA66E22267C4D003B81FB /* AccPayEndInterfaceController.swift */; }; + 48CFA67022267C4D003B81FB /* AccPayEndInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA66E22267C4D003B81FB /* AccPayEndInterfaceController.swift */; }; + 48CFA67222267CE9003B81FB /* AccPaym1InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA67122267CE9003B81FB /* AccPaym1InterfaceController.swift */; }; + 48CFA67322267CE9003B81FB /* AccPaym1InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA67122267CE9003B81FB /* AccPaym1InterfaceController.swift */; }; + 48DA0056221D11020081A500 /* AccountDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DA0055221D11020081A500 /* AccountDetailCell.swift */; }; + 48DA0058221D12E70081A500 /* AccountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DA0057221D12E70081A500 /* AccountCell.swift */; }; 48F243072214C98600B9C894 /* AccountTableInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48F243062214C98600B9C894 /* AccountTableInterfaceController.swift */; }; 48F243082214CA9600B9C894 /* AccountTableInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48F243062214C98600B9C894 /* AccountTableInterfaceController.swift */; }; 48F2430A2214CBA200B9C894 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 67BAC27C219E254800713FEF /* Interface.storyboard */; }; @@ -75,7 +85,13 @@ 1BEF4B8BF190D117CA6104E5 /* Pods-SynchronyFinancial WatchKit App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SynchronyFinancial WatchKit App.release.xcconfig"; path = "Pods/Target Support Files/Pods-SynchronyFinancial WatchKit App/Pods-SynchronyFinancial WatchKit App.release.xcconfig"; sourceTree = ""; }; 250BDAF6AD4E1CCA82995E30 /* Pods-SynchronyFinancial WatchKit Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SynchronyFinancial WatchKit Extension.release.xcconfig"; path = "Pods/Target Support Files/Pods-SynchronyFinancial WatchKit Extension/Pods-SynchronyFinancial WatchKit Extension.release.xcconfig"; sourceTree = ""; }; 396A16E056D05DEC937A07DA /* Pods-SynchronyFinancial.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SynchronyFinancial.release.xcconfig"; path = "Pods/Target Support Files/Pods-SynchronyFinancial/Pods-SynchronyFinancial.release.xcconfig"; sourceTree = ""; }; - 48F243042214C58A00B9C894 /* AccountCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountCell.swift; sourceTree = ""; }; + 48CFA6642226758A003B81FB /* PaymentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentCell.swift; sourceTree = ""; }; + 48CFA668222679B1003B81FB /* AccountPaymentInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountPaymentInterfaceController.swift; sourceTree = ""; }; + 48CFA66B22267BCC003B81FB /* AccPaym2InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccPaym2InterfaceController.swift; sourceTree = ""; }; + 48CFA66E22267C4D003B81FB /* AccPayEndInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccPayEndInterfaceController.swift; sourceTree = ""; }; + 48CFA67122267CE9003B81FB /* AccPaym1InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccPaym1InterfaceController.swift; sourceTree = ""; }; + 48DA0055221D11020081A500 /* AccountDetailCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountDetailCell.swift; sourceTree = ""; }; + 48DA0057221D12E70081A500 /* AccountCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountCell.swift; sourceTree = ""; }; 48F243062214C98600B9C894 /* AccountTableInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountTableInterfaceController.swift; sourceTree = ""; }; 48F2430B2214CBF700B9C894 /* Account.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Account.swift; sourceTree = ""; }; 48F2430C2214CBF700B9C894 /* Transaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Transaction.swift; sourceTree = ""; }; @@ -181,10 +197,16 @@ children = ( 673F396C21A644460051469E /* MainMenuInterfaceController.swift */, 67BAC28D219E254900713FEF /* ExtensionDelegate.swift */, + 48F243062214C98600B9C894 /* AccountTableInterfaceController.swift */, + 48CFA668222679B1003B81FB /* AccountPaymentInterfaceController.swift */, + 48CFA67122267CE9003B81FB /* AccPaym1InterfaceController.swift */, + 48CFA66B22267BCC003B81FB /* AccPaym2InterfaceController.swift */, + 48CFA66E22267C4D003B81FB /* AccPayEndInterfaceController.swift */, 67BAC291219E254900713FEF /* Assets.xcassets */, + 48DA0057221D12E70081A500 /* AccountCell.swift */, 67BAC293219E254900713FEF /* Info.plist */, - 48F243042214C58A00B9C894 /* AccountCell.swift */, - 48F243062214C98600B9C894 /* AccountTableInterfaceController.swift */, + 48CFA6642226758A003B81FB /* PaymentCell.swift */, + 48DA0055221D11020081A500 /* AccountDetailCell.swift */, ); path = "SynchronyFinancial WatchKit Extension"; sourceTree = ""; @@ -417,8 +439,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 48CFA67222267CE9003B81FB /* AccPaym1InterfaceController.swift in Sources */, 48F2430D2214CBF700B9C894 /* Account.swift in Sources */, + 48CFA66D22267BF0003B81FB /* AccPaym2InterfaceController.swift in Sources */, 48F2430E2214CBF700B9C894 /* Transaction.swift in Sources */, + 48CFA66F22267C4D003B81FB /* AccPayEndInterfaceController.swift in Sources */, + 48CFA66A22267A34003B81FB /* AccountPaymentInterfaceController.swift in Sources */, 67BAC269219E254700713FEF /* AppDelegate.swift in Sources */, 48F243082214CA9600B9C894 /* AccountTableInterfaceController.swift in Sources */, ); @@ -428,11 +454,17 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 48F243052214C58A00B9C894 /* AccountCell.swift in Sources */, + 48DA0056221D11020081A500 /* AccountDetailCell.swift in Sources */, + 48CFA66C22267BCC003B81FB /* AccPaym2InterfaceController.swift in Sources */, 67BAC28E219E254900713FEF /* ExtensionDelegate.swift in Sources */, + 48CFA669222679B1003B81FB /* AccountPaymentInterfaceController.swift in Sources */, + 48CFA6652226758A003B81FB /* PaymentCell.swift in Sources */, + 48CFA67322267CE9003B81FB /* AccPaym1InterfaceController.swift in Sources */, 673F396E21A644570051469E /* MainMenuInterfaceController.swift in Sources */, 48F243072214C98600B9C894 /* AccountTableInterfaceController.swift in Sources */, 48F2430F2214CC2200B9C894 /* Transaction.swift in Sources */, + 48CFA67022267C4D003B81FB /* AccPayEndInterfaceController.swift in Sources */, + 48DA0058221D12E70081A500 /* AccountCell.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From d52628cbd734db80963e998272897ec2fb534184 Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Wed, 6 Mar 2019 19:44:32 -0500 Subject: [PATCH 03/11] SWF-10 remove unused classes --- .../AccPayEndInterfaceController.swift | 25 ----------------- .../AccPaym1InterfaceController.swift | 23 ---------------- .../AccPaym2InterfaceController.swift | 27 ------------------- .../AccountDetailCell.swift | 16 ----------- ...> AccountDetailsInterfaceController.swift} | 24 ++++++++--------- .../PaymentCell.swift | 13 --------- 6 files changed, 12 insertions(+), 116 deletions(-) delete mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPayEndInterfaceController.swift delete mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym1InterfaceController.swift delete mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym2InterfaceController.swift delete mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailCell.swift rename SynchronyFinancial/SynchronyFinancial WatchKit Extension/{AccountPaymentInterfaceController.swift => AccountDetailsInterfaceController.swift} (62%) delete mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/PaymentCell.swift diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPayEndInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPayEndInterfaceController.swift deleted file mode 100644 index 2170e44..0000000 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPayEndInterfaceController.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// AccPayEndInterfaceController.swift -// SynchronyFinancial -// -// Created by Monday on 2019/02/27. -// Copyright © 2019 Alan Maynard. All rights reserved. -// - -import Foundation -import WatchKit -class AccPayEndInterfaceController: WKInterfaceController { - - @IBAction func returnButton() { - } - 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 WatchKit Extension/AccPaym1InterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym1InterfaceController.swift deleted file mode 100644 index 6b4836c..0000000 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym1InterfaceController.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// AccPaym1InterfaceController.swift -// SynchronyFinancial -// -// Created by Monday on 2019/02/27. -// Copyright © 2019 Alan Maynard. All rights reserved. -// - -import Foundation -import WatchKit -class AccPaym1InterfaceController: WKInterfaceController { - - 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 WatchKit Extension/AccPaym2InterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym2InterfaceController.swift deleted file mode 100644 index a1018f3..0000000 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccPaym2InterfaceController.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// AccPaym2InterfaceController.swift -// SynchronyFinancial WatchKit Extension -// -// Created by Monday on 2019/02/27. -// Copyright © 2019 Alan Maynard. All rights reserved. -// - -import Foundation -import WatchKit -class AccPaym2InterfaceController: WKInterfaceController { - - @IBOutlet weak var acctName: WKInterfaceLabel! - @IBOutlet weak var datePay: WKInterfaceLabel! - @IBAction func paymentButton2() { - } - 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 WatchKit Extension/AccountDetailCell.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailCell.swift deleted file mode 100644 index e4a7ec3..0000000 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailCell.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// AccountDetailCell.swift -// SynchronyFinancial WatchKit Extension -// -// Created by Monday on 2019/02/19. -// Copyright © 2019 Alan Maynard. All rights reserved. -// -import WatchKit -import Foundation -class AccountDetailCell: NSObject { - @IBOutlet weak var Label: WKInterfaceLabel! - - @IBOutlet weak var payNowButton: WKInterfaceButton! - - -} diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountPaymentInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift similarity index 62% rename from SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountPaymentInterfaceController.swift rename to SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift index a8d3dfb..6af904b 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountPaymentInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift @@ -1,31 +1,31 @@ // -// AccountPaymentInterfaceController.swift +// AccountDetailsInterfaceController.swift // SynchronyFinancial WatchKit Extension // -// Created by Monday on 2019/02/27. +// Created by Alan Maynard on 3/6/19. // Copyright © 2019 Alan Maynard. All rights reserved. // -import Foundation import WatchKit -class AccountPaymentInterfaceController: WKInterfaceController { - - - @IBOutlet weak var pay1label: WKInterfaceLabel! +import Foundation + + +class AccountDetailsInterfaceController: WKInterfaceController { - @IBAction func payButton() { + 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 WatchKit Extension/PaymentCell.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/PaymentCell.swift deleted file mode 100644 index 235778d..0000000 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/PaymentCell.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Payment.swift -// SynchronyFinancial WatchKit Extension -// -// Created by Monday on 2019/02/27. -// Copyright © 2019 Alan Maynard. All rights reserved. -// - -import Foundation -import WatchKit -class payment: NSObject { - -} From 1c702422688eeb630eeefb4c529d3474056ba2fc Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Wed, 6 Mar 2019 19:45:31 -0500 Subject: [PATCH 04/11] SWF-10 Change some file targets - made `Account.swift` target iOS and watchOS projects --- .../project.pbxproj | 40 ++++--------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj b/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj index 14dd4f5..4cfb02f 100644 --- a/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj +++ b/SynchronyFinancial/SynchronyFinancial.xcodeproj/project.pbxproj @@ -8,16 +8,6 @@ /* Begin PBXBuildFile section */ 281283568A34D3C5D9C7B383 /* libPods-SynchronyFinancial WatchKit Extension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAA6D46F907ADAABF49FD409 /* libPods-SynchronyFinancial WatchKit Extension.a */; }; - 48CFA6652226758A003B81FB /* PaymentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA6642226758A003B81FB /* PaymentCell.swift */; }; - 48CFA669222679B1003B81FB /* AccountPaymentInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA668222679B1003B81FB /* AccountPaymentInterfaceController.swift */; }; - 48CFA66A22267A34003B81FB /* AccountPaymentInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA668222679B1003B81FB /* AccountPaymentInterfaceController.swift */; }; - 48CFA66C22267BCC003B81FB /* AccPaym2InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA66B22267BCC003B81FB /* AccPaym2InterfaceController.swift */; }; - 48CFA66D22267BF0003B81FB /* AccPaym2InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA66B22267BCC003B81FB /* AccPaym2InterfaceController.swift */; }; - 48CFA66F22267C4D003B81FB /* AccPayEndInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA66E22267C4D003B81FB /* AccPayEndInterfaceController.swift */; }; - 48CFA67022267C4D003B81FB /* AccPayEndInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA66E22267C4D003B81FB /* AccPayEndInterfaceController.swift */; }; - 48CFA67222267CE9003B81FB /* AccPaym1InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA67122267CE9003B81FB /* AccPaym1InterfaceController.swift */; }; - 48CFA67322267CE9003B81FB /* AccPaym1InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CFA67122267CE9003B81FB /* AccPaym1InterfaceController.swift */; }; - 48DA0056221D11020081A500 /* AccountDetailCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DA0055221D11020081A500 /* AccountDetailCell.swift */; }; 48DA0058221D12E70081A500 /* AccountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DA0057221D12E70081A500 /* AccountCell.swift */; }; 48F243072214C98600B9C894 /* AccountTableInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48F243062214C98600B9C894 /* AccountTableInterfaceController.swift */; }; 48F243082214CA9600B9C894 /* AccountTableInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48F243062214C98600B9C894 /* AccountTableInterfaceController.swift */; }; @@ -27,6 +17,9 @@ 48F2430F2214CC2200B9C894 /* Transaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48F2430C2214CBF700B9C894 /* Transaction.swift */; }; 673F396E21A644570051469E /* MainMenuInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 673F396C21A644460051469E /* MainMenuInterfaceController.swift */; }; 673F397021A652A00051469E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 673F396F21A652A00051469E /* Assets.xcassets */; }; + 678C38842230950100FEAAF6 /* AccountDetailsInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 678C38832230950100FEAAF6 /* AccountDetailsInterfaceController.swift */; }; + 678C3885223098C400FEAAF6 /* Account.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48F2430B2214CBF700B9C894 /* Account.swift */; }; + 678C388622309F7D00FEAAF6 /* AccountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DA0057221D12E70081A500 /* AccountCell.swift */; }; 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 */; }; @@ -85,12 +78,6 @@ 1BEF4B8BF190D117CA6104E5 /* Pods-SynchronyFinancial WatchKit App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SynchronyFinancial WatchKit App.release.xcconfig"; path = "Pods/Target Support Files/Pods-SynchronyFinancial WatchKit App/Pods-SynchronyFinancial WatchKit App.release.xcconfig"; sourceTree = ""; }; 250BDAF6AD4E1CCA82995E30 /* Pods-SynchronyFinancial WatchKit Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SynchronyFinancial WatchKit Extension.release.xcconfig"; path = "Pods/Target Support Files/Pods-SynchronyFinancial WatchKit Extension/Pods-SynchronyFinancial WatchKit Extension.release.xcconfig"; sourceTree = ""; }; 396A16E056D05DEC937A07DA /* Pods-SynchronyFinancial.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SynchronyFinancial.release.xcconfig"; path = "Pods/Target Support Files/Pods-SynchronyFinancial/Pods-SynchronyFinancial.release.xcconfig"; sourceTree = ""; }; - 48CFA6642226758A003B81FB /* PaymentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentCell.swift; sourceTree = ""; }; - 48CFA668222679B1003B81FB /* AccountPaymentInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountPaymentInterfaceController.swift; sourceTree = ""; }; - 48CFA66B22267BCC003B81FB /* AccPaym2InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccPaym2InterfaceController.swift; sourceTree = ""; }; - 48CFA66E22267C4D003B81FB /* AccPayEndInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccPayEndInterfaceController.swift; sourceTree = ""; }; - 48CFA67122267CE9003B81FB /* AccPaym1InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccPaym1InterfaceController.swift; sourceTree = ""; }; - 48DA0055221D11020081A500 /* AccountDetailCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountDetailCell.swift; sourceTree = ""; }; 48DA0057221D12E70081A500 /* AccountCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountCell.swift; sourceTree = ""; }; 48F243062214C98600B9C894 /* AccountTableInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountTableInterfaceController.swift; sourceTree = ""; }; 48F2430B2214CBF700B9C894 /* Account.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Account.swift; sourceTree = ""; }; @@ -98,6 +85,7 @@ 4EA10823B2E5A7A4FEF31740 /* libPods-SynchronyFinancial WatchKit App.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SynchronyFinancial WatchKit App.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 673F396C21A644460051469E /* MainMenuInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenuInterfaceController.swift; sourceTree = ""; }; 673F396F21A652A00051469E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 678C38832230950100FEAAF6 /* AccountDetailsInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountDetailsInterfaceController.swift; 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 = ""; }; @@ -198,15 +186,10 @@ 673F396C21A644460051469E /* MainMenuInterfaceController.swift */, 67BAC28D219E254900713FEF /* ExtensionDelegate.swift */, 48F243062214C98600B9C894 /* AccountTableInterfaceController.swift */, - 48CFA668222679B1003B81FB /* AccountPaymentInterfaceController.swift */, - 48CFA67122267CE9003B81FB /* AccPaym1InterfaceController.swift */, - 48CFA66B22267BCC003B81FB /* AccPaym2InterfaceController.swift */, - 48CFA66E22267C4D003B81FB /* AccPayEndInterfaceController.swift */, + 678C38832230950100FEAAF6 /* AccountDetailsInterfaceController.swift */, 67BAC291219E254900713FEF /* Assets.xcassets */, 48DA0057221D12E70081A500 /* AccountCell.swift */, 67BAC293219E254900713FEF /* Info.plist */, - 48CFA6642226758A003B81FB /* PaymentCell.swift */, - 48DA0055221D11020081A500 /* AccountDetailCell.swift */, ); path = "SynchronyFinancial WatchKit Extension"; sourceTree = ""; @@ -457,12 +440,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 48CFA67222267CE9003B81FB /* AccPaym1InterfaceController.swift in Sources */, 48F2430D2214CBF700B9C894 /* Account.swift in Sources */, - 48CFA66D22267BF0003B81FB /* AccPaym2InterfaceController.swift in Sources */, + 678C388622309F7D00FEAAF6 /* AccountCell.swift in Sources */, 48F2430E2214CBF700B9C894 /* Transaction.swift in Sources */, - 48CFA66F22267C4D003B81FB /* AccPayEndInterfaceController.swift in Sources */, - 48CFA66A22267A34003B81FB /* AccountPaymentInterfaceController.swift in Sources */, 67BAC269219E254700713FEF /* AppDelegate.swift in Sources */, 48F243082214CA9600B9C894 /* AccountTableInterfaceController.swift in Sources */, ); @@ -472,16 +452,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 48DA0056221D11020081A500 /* AccountDetailCell.swift in Sources */, - 48CFA66C22267BCC003B81FB /* AccPaym2InterfaceController.swift in Sources */, + 678C3885223098C400FEAAF6 /* Account.swift in Sources */, 67BAC28E219E254900713FEF /* ExtensionDelegate.swift in Sources */, - 48CFA669222679B1003B81FB /* AccountPaymentInterfaceController.swift in Sources */, - 48CFA6652226758A003B81FB /* PaymentCell.swift in Sources */, - 48CFA67322267CE9003B81FB /* AccPaym1InterfaceController.swift in Sources */, + 678C38842230950100FEAAF6 /* AccountDetailsInterfaceController.swift in Sources */, 673F396E21A644570051469E /* MainMenuInterfaceController.swift in Sources */, 48F243072214C98600B9C894 /* AccountTableInterfaceController.swift in Sources */, 48F2430F2214CC2200B9C894 /* Transaction.swift in Sources */, - 48CFA67022267C4D003B81FB /* AccPayEndInterfaceController.swift in Sources */, 48DA0058221D12E70081A500 /* AccountCell.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; From 4f9101002a02d814130445d95136ac9c23b52a0e Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Wed, 6 Mar 2019 19:47:05 -0500 Subject: [PATCH 05/11] SWF-10 Remove unused outlets and interface controllers --- .../Base.lproj/Interface.storyboard | 102 ++---------------- 1 file changed, 8 insertions(+), 94 deletions(-) diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard index 7278bab..3ceb897 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard +++ b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard @@ -51,7 +51,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + From 3a44e1180de030148153b58c8b192949a1b82b01 Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Wed, 6 Mar 2019 19:48:25 -0500 Subject: [PATCH 06/11] SWF-10 Resolve swiftlint warnings, configure table for accounts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - created function to populate with “dummy” accounts - created function to configure each row in table - implemented `contextForSegue` function to allow us to “pass” the selected account to the next interface controller --- .../AccountDetailsInterfaceController.swift | 1 - .../AccountTableInterfaceController.swift | 40 ++++++++++++++++--- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift index 6af904b..1a51ac6 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift @@ -9,7 +9,6 @@ import WatchKit import Foundation - class AccountDetailsInterfaceController: WKInterfaceController { override func awake(withContext context: Any?) { diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift index a30fa7b..563adab 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift @@ -9,17 +9,18 @@ import WatchKit import Foundation - class AccountTableInterfaceController: WKInterfaceController { + var accounts: [Account] = [] + var acctDict: [String: Account] = [:] @IBOutlet weak var accountTable: WKInterfaceTable! override func awake(withContext context: Any?) { super.awake(withContext: context) - accountTable.setNumberOfRows(5, withRowType: "account") - // Configure interface objects here. + + populateDemoDate() + configureRows() } - - + override func willActivate() { // This method is called when watch view controller is about to be visible to user super.willActivate() @@ -30,4 +31,33 @@ class AccountTableInterfaceController: WKInterfaceController { super.didDeactivate() } + override func table(_ table: WKInterfaceTable, didSelectRowAt rowIndex: Int) { + acctDict["acct"] = accounts[rowIndex] + } + + override func contextForSegue(withIdentifier segueIdentifier: String) -> Any? { + if segueIdentifier == "showAccountDetails" { + return acctDict + } + + return nil + } + + private func configureRows() { + accountTable.setNumberOfRows(accounts.count, withRowType: "account") + + for index in 0.. Date: Wed, 6 Mar 2019 20:15:18 -0500 Subject: [PATCH 07/11] SWF-10 Account Details set up - change how we get the account before it is passed to account details - wrote methods to set up account details screen with the account object that is received --- .../Base.lproj/Interface.storyboard | 22 +++++++++++++-- .../AccountDetailsInterfaceController.swift | 28 +++++++++++++++++-- .../AccountTableInterfaceController.swift | 8 ++---- 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard index 3ceb897..d2f0a7a 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard +++ b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard @@ -100,7 +100,7 @@ - + @@ -116,9 +116,25 @@ - + + + + + + + + + + + - + diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift index 1a51ac6..f0782ea 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift @@ -10,11 +10,23 @@ import WatchKit import Foundation class AccountDetailsInterfaceController: WKInterfaceController { + var selectedAccount: Account? + + @IBOutlet weak var balanceLabel: WKInterfaceLabel! + @IBOutlet weak var availableFundsLabel: WKInterfaceLabel! + @IBOutlet weak var accountNameLabel: WKInterfaceLabel! + @IBOutlet weak var nextPaymentDueLabel: WKInterfaceLabel! override func awake(withContext context: Any?) { super.awake(withContext: context) - - // Configure interface objects here. + + guard let data = context as? [String: Account] else { + NSLog("Error receiving context containing selected account in AccountDetailInterfaceController") + return + } + + selectedAccount = data["acct"] + configureForAccount() } override func willActivate() { @@ -27,4 +39,16 @@ class AccountDetailsInterfaceController: WKInterfaceController { super.didDeactivate() } + private func configureForAccount() { + guard selectedAccount != nil, let acct = selectedAccount else { + NSLog("Error configuring AccountDetails. selectedAccount is nil") + return + } + + accountNameLabel.setText(acct.accountNumber) + balanceLabel.setText("Balance: $\(acct.balance)") + availableFundsLabel.setText("Available: $\(acct.limit - acct.balance)") + let date = DateFormatter.localizedString(from: acct.paymentDueDate, dateStyle: .medium, timeStyle: .none) + nextPaymentDueLabel.setText(date) + } } diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift index 563adab..b3ac09d 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift @@ -31,15 +31,11 @@ class AccountTableInterfaceController: WKInterfaceController { super.didDeactivate() } - override func table(_ table: WKInterfaceTable, didSelectRowAt rowIndex: Int) { - acctDict["acct"] = accounts[rowIndex] - } - - override func contextForSegue(withIdentifier segueIdentifier: String) -> Any? { + override func contextForSegue(withIdentifier segueIdentifier: String, in table: WKInterfaceTable, rowIndex: Int) -> Any? { if segueIdentifier == "showAccountDetails" { + acctDict.updateValue(accounts[rowIndex], forKey: "acct") return acctDict } - return nil } From 424e7eb73b1f9dd47d8416f024adab02e75e8e4b Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Wed, 6 Mar 2019 20:21:32 -0500 Subject: [PATCH 08/11] SWF-10 Fix typo and set up format strings for labels --- .../AccountDetailsInterfaceController.swift | 9 ++++++--- .../AccountTableInterfaceController.swift | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift index f0782ea..cacf7c1 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountDetailsInterfaceController.swift @@ -45,10 +45,13 @@ class AccountDetailsInterfaceController: WKInterfaceController { return } - accountNameLabel.setText(acct.accountNumber) - balanceLabel.setText("Balance: $\(acct.balance)") - availableFundsLabel.setText("Available: $\(acct.limit - acct.balance)") + let balanceFormatted = String(format: "%.2f", acct.balance) + let availableFormatted = String(format: "%.2f", acct.limit - acct.balance) let date = DateFormatter.localizedString(from: acct.paymentDueDate, dateStyle: .medium, timeStyle: .none) + + accountNameLabel.setText(acct.accountNumber) + balanceLabel.setText("Balance: $\(balanceFormatted)") + availableFundsLabel.setText("Available: $\(availableFormatted)") nextPaymentDueLabel.setText(date) } } diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift index b3ac09d..ddbffd5 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift @@ -17,7 +17,7 @@ class AccountTableInterfaceController: WKInterfaceController { override func awake(withContext context: Any?) { super.awake(withContext: context) - populateDemoDate() + populateDemoData() configureRows() } @@ -31,6 +31,7 @@ class AccountTableInterfaceController: WKInterfaceController { super.didDeactivate() } + //swiftlint:disable:next line_length override func contextForSegue(withIdentifier segueIdentifier: String, in table: WKInterfaceTable, rowIndex: Int) -> Any? { if segueIdentifier == "showAccountDetails" { acctDict.updateValue(accounts[rowIndex], forKey: "acct") @@ -49,7 +50,7 @@ class AccountTableInterfaceController: WKInterfaceController { } } - private func populateDemoDate() { + private func populateDemoData() { //swiftlint:disable line_length accounts.append(Account(accountNumber: "TD Bank", limit: 500.00, transactions: [], paymentDueDate: Date(), cycleEndDate: Date())) accounts.append(Account(accountNumber: "Care Credit", limit: 10000.00, transactions: [], paymentDueDate: Date(), cycleEndDate: Date())) From 1b6bc34dc00c1dbf2e6c471c81725526c6272a75 Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Thu, 21 Mar 2019 12:50:09 -0400 Subject: [PATCH 09/11] SWF-11 Create new classes to support transaction display - `TransactionsInterfactController` will hold a table of recent transactions - `TransactionCell` provides a model for our table cell --- .../TransactionCell.swift | 16 +++++++ .../TransactionsInterfaceController.swift | 48 +++++++++++++++++++ .../project.pbxproj | 8 ++++ 3 files changed, 72 insertions(+) create mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/TransactionCell.swift create mode 100644 SynchronyFinancial/SynchronyFinancial WatchKit Extension/TransactionsInterfaceController.swift diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/TransactionCell.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/TransactionCell.swift new file mode 100644 index 0000000..e9d39bd --- /dev/null +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/TransactionCell.swift @@ -0,0 +1,16 @@ +// +// TransactionCell.swift +// SynchronyFinancial WatchKit Extension +// +// Created by Alan Maynard on 3/20/19. +// Copyright © 2019 Alan Maynard. All rights reserved. +// + +import Foundation +import WatchKit + +class TransactionCell: NSObject { + + @IBOutlet weak var transactionLabel: WKInterfaceLabel! + @IBOutlet weak var valueLabel: WKInterfaceLabel! +} diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/TransactionsInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/TransactionsInterfaceController.swift new file mode 100644 index 0000000..5fe7f07 --- /dev/null +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/TransactionsInterfaceController.swift @@ -0,0 +1,48 @@ +// +// TransactionsInterfaceController.swift +// SynchronyFinancial WatchKit Extension +// +// Created by Alan Maynard on 3/20/19. +// Copyright © 2019 Alan Maynard. All rights reserved. +// + +import WatchKit +import Foundation + +class TransactionsInterfaceController: WKInterfaceController { + @IBOutlet weak var transactionsTable: WKInterfaceTable! + var transactions: [Transaction] = [] + + override func awake(withContext context: Any?) { + super.awake(withContext: context) + for i in 0..<5 { + transactions.append(Transaction(type: .purchase, amount: 50.00 * Double(i), merchantID: "WalMart Store 1245\(i)", date: Calendar.current.date(byAdding: .day, value: -i, to: Date()) ?? Date())) + transactions.append(Transaction(type: .reimbursement, amount: 12.5 * Double(i), merchantID: "Thank You", date: Calendar.current.date(byAdding: .day, value: -i, to: Date()) ?? Date())) + } + configureRows() + } + + 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() + } + + private func configureRows() { + // first sort our demo data in descending date order + transactions.sort(by: { $0.date > $1.date }) + transactionsTable.setNumberOfRows(transactions.count, withRowType: "transactionCell") + + for index in 0.. Date: Thu, 21 Mar 2019 12:51:37 -0400 Subject: [PATCH 10/11] SWF-11 Storyboard changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added TransactionsInterfaceController - In order to have a page based navigation allowing swipe between Account Details and Transactions, it was necessary to change the segue from the Accounts Table to “modal” type --- .../Base.lproj/Interface.storyboard | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard index d2f0a7a..10ce75c 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard +++ b/SynchronyFinancial/SynchronyFinancial WatchKit App/Base.lproj/Interface.storyboard @@ -100,7 +100,7 @@ - + @@ -131,10 +131,40 @@ + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+ +
From bb5623c50c3cbad4f9526bf35fc49fbbca89eb06 Mon Sep 17 00:00:00 2001 From: Alan Maynard Date: Thu, 21 Mar 2019 12:54:54 -0400 Subject: [PATCH 11/11] SWF-11 Change context for segue - As a result of the change to modal presentation, the function we must override has changed - Instead of returning the context for the next interface controller, we return an array of contexts, each corresponding to the interface controllers in the order they appear in the navigation stack (Account details is first, transactions is now second) - once web service is set up, transactions should be passed to TransactionsInterfactController from this function --- .../AccountTableInterfaceController.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift index ddbffd5..baa7b73 100644 --- a/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift +++ b/SynchronyFinancial/SynchronyFinancial WatchKit Extension/AccountTableInterfaceController.swift @@ -31,11 +31,12 @@ class AccountTableInterfaceController: WKInterfaceController { super.didDeactivate() } - //swiftlint:disable:next line_length - override func contextForSegue(withIdentifier segueIdentifier: String, in table: WKInterfaceTable, rowIndex: Int) -> Any? { + override func contextsForSegue(withIdentifier segueIdentifier: String, in table: WKInterfaceTable, rowIndex: Int) -> [Any]? { if segueIdentifier == "showAccountDetails" { + // account data is passed to the first interface controller in our new navigation stack + // if we want to pass to subsequent interface controllers, we would add them in corresponding order acctDict.updateValue(accounts[rowIndex], forKey: "acct") - return acctDict + return [acctDict] } return nil }