Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ahm11003 committed Mar 21, 2019
1 parent 7e8a9ce commit bb5623c
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -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
}
Expand Down

0 comments on commit bb5623c

Please sign in to comment.