Skip to content

Instantly share code, notes, and snippets.

@MickaelCruzDB
Created March 18, 2020 13:12
Show Gist options
  • Save MickaelCruzDB/0be78b9c1873edeec96ad3105c246246 to your computer and use it in GitHub Desktop.
Save MickaelCruzDB/0be78b9c1873edeec96ad3105c246246 to your computer and use it in GitHub Desktop.
@IBAction func close360Pressed(_ sender: Any) {
self.vviewmgr.stop()
self.view.bringSubviewToFront(self.activityIndicator)
self.activityIndicator.alpha = 1
self.activityIndicator.startAnimating()
UIView.animate(withDuration: 0.5) {
self.seekSlider.alpha = 0
}
let when = DispatchTime.now() + 1
DispatchQueue.main.asyncAfter(deadline: when) {
UIView.animate(withDuration: 1, delay: 0.0, options: [], animations: {
self.activityIndicator.alpha = 0
self.activityIndicator.stopAnimating()
self.seekSlider.alpha = 0
//present ViewController here
let modalStyle = UIModalTransitionStyle.crossDissolve
let svc = ViewController()
svc.modalTransitionStyle = modalStyle
self.present(svc, animated: true, completion: nil)
}, completion: nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment