mirror of
https://github.com/confirmedcode/Lockdown-iOS.git
synced 2025-12-21 12:14:02 +01:00
34 lines
1.1 KiB
Swift
34 lines
1.1 KiB
Swift
//
|
|
// AccountUI.swift
|
|
// Lockdown
|
|
//
|
|
// Created by Oleg Dreyman on 06.10.2020.
|
|
// Copyright © 2020 Confirmed Inc. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
enum AccountUI {
|
|
|
|
static let accountStateDidChange = Notification.Name("AccountUIAccountStateDidChangeNotification")
|
|
|
|
static func presentCreateAccount(on vc: UIViewController) {
|
|
let storyboard = UIStoryboard.main
|
|
let viewController = storyboard.instantiateViewController(withIdentifier: "emailSignUpViewController") as! EmailSignUpViewController
|
|
viewController.delegate.showSignIn = { [weak vc] in
|
|
if let strongVC = vc {
|
|
AccountUI.presentSignInToAccount(on: strongVC)
|
|
}
|
|
}
|
|
|
|
vc.present(viewController, animated: true, completion: nil)
|
|
}
|
|
|
|
static func presentSignInToAccount(on vc: UIViewController) {
|
|
let storyboard = UIStoryboard.main
|
|
let viewController = storyboard.instantiateViewController(withIdentifier: "emailSignInViewController") as! EmailSignInViewController
|
|
|
|
vc.present(viewController, animated: true, completion: nil)
|
|
}
|
|
}
|