guide/Guibe/ViewController.swift
2019-07-20 23:29:13 +01:00

49 lines
1.6 KiB
Swift

//
// ViewController.swift
// Guibe
//
// Created by Max Hunt on 28/05/2019.
// Copyright © 2019 8. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var guibeScreen: UIImageView!
let defaults = UserDefaults.standard
override func viewDidLoad() {
super.viewDidLoad()
guibeScreen.accessibilityLabel = "ghibe"
let setupDone = defaults.integer(forKey: "setupDone")
if setupDone != 2 {
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "screen3") as! S3artViewController
nextViewController.modalTransitionStyle = .crossDissolve
nextViewController.modalPresentationStyle = .fullScreen
self.present(nextViewController, animated: true, completion: nil)
// self.show(nextViewController, sender: self)
}
}
if setupDone == 2 {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
let nextViewController = self.storyboard?.instantiateViewController(withIdentifier: "mainScreen") as! MainViewController
nextViewController.modalTransitionStyle = .crossDissolve
// self.show(nextViewController, sender: self)
nextViewController.modalPresentationStyle = .fullScreen
self.present(nextViewController, animated: true, completion: nil)
}
}
// Do any additional setup after loading the view.
}
}