Files
Dirk JäckelandGitHub 7d8d06f4b3 Gh 3138 - Generate Key via appleid (#3162)
* GH-3138 Backup commit. works but needs cleanup
* GH-3138 Fixing entitlement filename resolution
* GH-3138 Show Snackbar if user cancels auth request. We can probably do nothing in this case.
* GH-3138 apple id aggregate verifier commit
* Handle all ASAuthorizationError s
* show private key on success as Snackbar
* Show next screen when authorization done
* Pass key to the next screen and continue with the flow.
* Mark place for safe creation entry point
2023-07-12 10:13:20 +02:00

53 lines
1.5 KiB
Swift

//
// EnableNotificationViewController.swift
// Multisig
//
// Created by Mouaz on 6/23/23.
// Copyright © 2023 Gnosis Ltd. All rights reserved.
//
import UIKit
class SafeActionViewController: UIViewController {
@IBOutlet private weak var titleLabel: UILabel!
@IBOutlet private weak var imageView: UIImageView!
@IBOutlet private weak var secondaryActionButton: UIButton!
@IBOutlet private weak var primaryActionButton: UIButton!
@IBOutlet private weak var descriptionLabel: UILabel!
var titleText: String?
var descriptionText: String?
var primaryActionTitle: String?
var secondaryActionTitle: String?
var imageName: String?
var onPrimaryAction: () -> () = {}
var onSecondaryAction: () -> () = {}
override func viewDidLoad() {
super.viewDidLoad()
assert(titleText != nil)
assert(descriptionText != nil)
assert(primaryActionTitle != nil)
assert(secondaryActionTitle != nil)
assert(imageName != nil)
titleLabel.text = titleText
descriptionLabel.text = descriptionText
imageView.image = UIImage(named: imageName!)
titleLabel.setStyle(.title1)
descriptionLabel.setStyle(.body)
primaryActionButton.setText(primaryActionTitle, .filled)
secondaryActionButton.setText(secondaryActionTitle, .primary)
}
@IBAction func primaryActionTouched(_ sender: Any) {
onPrimaryAction()
}
@IBAction func secondaryActionTouched(_ sender: Any) {
onSecondaryAction()
}
}