Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SWF-12 Update navigation
  • Loading branch information
ahm11003 committed Mar 28, 2019
1 parent 188adc3 commit b8d1b81
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Expand Up @@ -100,7 +100,6 @@
</group>
<connections>
<outlet property="accountName" destination="Tl1-Kc-YJS" id="cgD-CY-lzh"/>
<segue destination="yrN-yp-gkH" kind="modal" identifier="showAccountDetails" id="geu-70-EU1"/>
</connections>
</tableRow>
</items>
Expand All @@ -113,10 +112,10 @@
</objects>
<point key="canvasLocation" x="414" y="-53"/>
</scene>
<!--Account Details Interface Controller-->
<!--AccountDetails-->
<scene sceneID="ozX-Kj-4yZ">
<objects>
<controller id="yrN-yp-gkH" customClass="AccountDetailsInterfaceController" customModule="SynchronyFinancial_WatchKit_Extension">
<controller identifier="AccountDetails" id="yrN-yp-gkH" customClass="AccountDetailsInterfaceController" customModule="SynchronyFinancial_WatchKit_Extension">
<items>
<label width="1" alignment="left" text="Label" textAlignment="center" id="qzl-GE-bpZ">
<fontDescription key="font" style="UICTFontTextStyleHeadline"/>
Expand All @@ -140,7 +139,7 @@
</connections>
</controller>
</objects>
<point key="canvasLocation" x="755" y="-53.5"/>
<point key="canvasLocation" x="755" y="-231"/>
</scene>
<!--PayMinimum-->
<scene sceneID="Kfg-ZO-Pav">
Expand Down Expand Up @@ -168,7 +167,7 @@
</connections>
</controller>
</objects>
<point key="canvasLocation" x="1084" y="-52"/>
<point key="canvasLocation" x="755" y="186"/>
</scene>
<!--Payment Detail Interface Controller-->
<scene sceneID="vQy-l8-oEp">
Expand All @@ -190,12 +189,12 @@
</connections>
</controller>
</objects>
<point key="canvasLocation" x="1405" y="-56"/>
<point key="canvasLocation" x="1085" y="186"/>
</scene>
<!--Transactions Interface Controller-->
<!--Transactions-->
<scene sceneID="yXO-yR-k6b">
<objects>
<controller id="Jfd-Hv-PHe" customClass="TransactionsInterfaceController" customModule="SynchronyFinancial_WatchKit_Extension">
<controller identifier="Transactions" id="Jfd-Hv-PHe" customClass="TransactionsInterfaceController" customModule="SynchronyFinancial_WatchKit_Extension">
<items>
<table alignment="left" id="OQb-xu-Ynf">
<items>
Expand All @@ -219,7 +218,7 @@
</connections>
</controller>
</objects>
<point key="canvasLocation" x="1131" y="379"/>
<point key="canvasLocation" x="1085" y="-229"/>
</scene>
</scenes>
<inferredMetricsTieBreakers>
Expand Down
Expand Up @@ -12,6 +12,7 @@ import Foundation
class AccountTableInterfaceController: WKInterfaceController {
var accounts: [Account] = []
var acctDict: [String: Account] = [:]
var transactionDict: [String: [Transaction]] = [:]

@IBOutlet weak var accountTable: WKInterfaceTable!
override func awake(withContext context: Any?) {
Expand Down Expand Up @@ -41,6 +42,11 @@ class AccountTableInterfaceController: WKInterfaceController {
return nil
}

override func table(_ table: WKInterfaceTable, didSelectRowAt rowIndex: Int) {
acctDict.updateValue(accounts[rowIndex], forKey: "acct")
self.presentController(withNames: ["AccountDetails", "Transactions"], contexts: [self.acctDict, self.transactionDict])
}

private func configureRows() {
accountTable.setNumberOfRows(accounts.count, withRowType: "account")

Expand Down

0 comments on commit b8d1b81

Please sign in to comment.