Created
June 13, 2016 15:21
-
-
Save maxcampolo/ea4ae4ed00f8a04cd185b6c151654f52 to your computer and use it in GitHub Desktop.
Check if a UIViewController is currently visible.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIViewController { | |
func isVisible() -> Bool { | |
return self.isViewLoaded() && self.view.window != nil | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment