Skip to content

Instantly share code, notes, and snippets.

@jazzedge
Created December 14, 2017 21:41
Show Gist options
  • Save jazzedge/e325cea8dc9e8075179b579938f5246a to your computer and use it in GitHub Desktop.
Save jazzedge/e325cea8dc9e8075179b579938f5246a to your computer and use it in GitHub Desktop.
class LaunchViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func viewDidAppear(_ animated: Bool) {
Thread.sleep(forTimeInterval: 0.5) // Pause for half a second
instantiateHomeViewContoller() // Instantiate HomeViewController
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
func instantiateHomeViewContoller() {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let ivc = storyboard.instantiateViewController(withIdentifier: "HomeVC")
ivc.modalTransitionStyle = .crossDissolve
ivc.view.layer.speed = 0.1
self.present(ivc, animated: true, completion: nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment