Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
SynchronyFinancialWatchApp/SynchronyFinancial/SynchronyFinancial WatchKit Extension/PaymentResultInterfaceController.swift
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
38 lines (31 sloc)
1.13 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PaymentResultInterfaceController.swift | |
// SynchronyFinancial WatchKit Extension | |
// | |
// Created by Alan Maynard on 3/29/19. | |
// Copyright © 2019 Alan Maynard. All rights reserved. | |
// | |
import WatchKit | |
import Foundation | |
class PaymentResultInterfaceController: WKInterfaceController { | |
@IBOutlet weak var confirmationNumberLabel: WKInterfaceLabel! | |
@IBOutlet weak var paymentIDLabel: WKInterfaceLabel! | |
override func awake(withContext context: Any?) { | |
super.awake(withContext: context) | |
if let data = context as? [String: String], | |
let paymentConfirmation = data["payment_confirmation_number"], | |
let paymentID = data["payment_id"] { | |
confirmationNumberLabel.setText(paymentConfirmation) | |
paymentIDLabel.setText(paymentID) | |
setTitle("Done") | |
} | |
} | |
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() | |
} | |
} |