Skip to content

Instantly share code, notes, and snippets.

@pavel-sazonov
Forked from parrotbait/Best UIView Extension
Created April 3, 2019 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavel-sazonov/290e3ca9d94f1d6d72cf378aa106559f to your computer and use it in GitHub Desktop.
Save pavel-sazonov/290e3ca9d94f1d6d72cf378aa106559f to your computer and use it in GitHub Desktop.
Add basic missing functionality to UIKit
extension UIView {
var isVisible: Bool {
set {
self.isHidden = !newValue
}
get {
return !self.isHidden
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment