BlueWallet/ios/BlueWalletWatch Extension/ReceivePageInterfaceController.swift

30 lines
923 B
Swift
Raw Normal View History

2024-06-15 19:05:54 +02:00
//
// ReceivePageViewController.swift
// BlueWalletWatch Extension
//
// Created by Marcos Rodriguez on 6/15/24.
// Copyright © 2024 BlueWallet. All rights reserved.
//
import Foundation
import WatchKit
class ReceivePageInterfaceController: WKInterfaceController {
static let identifier = "ReceivePageInterfaceController"
var pageNames = ["Address", "Payment Code"]
var pageControllers = ["ReceiveInterfaceController", "ReceiveInterfaceController"]
override func awake(withContext context: Any?) {
super.awake(withContext: context)
let wallet = context as? Wallet
WKInterfaceController.reloadRootPageControllers(
withNames: pageControllers,
contexts: [(wallet,ReceiveMethod.Onchain , ReceiveType.Address), (wallet, ReceiveMethod.Onchain, ReceiveType.PaymentCode)],
orientation: .horizontal,
pageIndex: 0
)
}
}