Last active
May 23, 2023 11:35
-
-
Save faizy-ahmed/bbbd0408ccc629381c057fa8b061852a to your computer and use it in GitHub Desktop.
To check if a UIViewController is currently visible.
This file contains hidden or 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