Skip to content

Instantly share code, notes, and snippets.

@alexshive
Last active August 29, 2015 14:08
Show Gist options
  • Save alexshive/497eb0862341ca76a0db to your computer and use it in GitHub Desktop.
Save alexshive/497eb0862341ca76a0db to your computer and use it in GitHub Desktop.
Swift incorporation of the MRProgress Pod
// Works with tabs
class ViewController: UIViewController {
var overlay = MRProgressOverlayView()
var isAnimated = true
override func viewDidAppear(animated: Bool) {
loadProgressView()
}
override func viewDidDisappear(animated: Bool) {
overlay.dismiss(false)
}
func loadProgressView() {
overlay = MRProgressOverlayView.showOverlayAddedTo(self.view, animated: isAnimated)
isAnimated = false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment