Skip to content

Instantly share code, notes, and snippets.

View faizy-ahmed's full-sized avatar
🎯
Focusing

Syed Faizan Ahmed faizy-ahmed

🎯
Focusing
View GitHub Profile
@faizy-ahmed
faizy-ahmed / ViewController+IsVisible.swift
Last active May 23, 2023 11:35
To check if a UIViewController is currently visible.
extension UIViewController {
func isVisible() -> Bool {
return self.isViewLoaded() && self.view.window != nil
}
}