41 lines
1.3 KiB
Swift
41 lines
1.3 KiB
Swift
//
|
|
// ViewController.swift
|
|
// Guibe
|
|
//
|
|
// Created by Max Hunt on 28/05/2019.
|
|
// Copyright © 2019 8. All rights reserved.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
class ViewController: UIViewController {
|
|
|
|
let defaults = UserDefaults.standard
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
|
|
let setupDone = defaults.integer(forKey: "setupDone")
|
|
|
|
|
|
if setupDone != 2 {
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
|
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen2") as! W2lcomeViewController
|
|
nextViewController.modalTransitionStyle = .crossDissolve
|
|
self.present(nextViewController, animated: true, completion: nil)
|
|
}
|
|
}
|
|
|
|
if setupDone == 2 {
|
|
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
|
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "mainView") as! MainViewController
|
|
nextViewController.modalTransitionStyle = .crossDissolve
|
|
self.present(nextViewController, animated: true, completion: nil)
|
|
}
|
|
}
|
|
|
|
|
|
// Do any additional setup after loading the view.
|
|
}
|
|
}
|