Skip to content

Instantly share code, notes, and snippets.

@wbbernardes
Created June 27, 2020 23:11
Show Gist options
  • Save wbbernardes/738fa3bd75f708b2c815b15304f94e58 to your computer and use it in GitHub Desktop.
Save wbbernardes/738fa3bd75f708b2c815b15304f94e58 to your computer and use it in GitHub Desktop.
Extension to article
extension UIViewController {
func startLoading() {
let storyboard = UIStoryboard(name: LoadingViewController.storyboard, bundle: nil)
if let loadingViewController = storyboard.instantiateViewController(withIdentifier: LoadingViewController.viewControllerId) as? LoadingViewController {
loadingViewController.modalPresentationStyle = .overCurrentContext
present(loadingViewController, animated: true, completion: nil)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment