UIViewAPI

master

sloik/UIViewAPI

Main Nightly

UIViewAPI

UIKit related domain extensions that you just have to write from project to project.

isHidden

Sometimes getting this in a complicated ifs might be hard. Now you have isHidden, isNotHidden, isVisible and isNotVisible to help you say what you want 💬

Old:

view.isHidden = false

or

if view.isHidden == false {
    // ...
}

That's annoying... now you can do what you have always wanted!

if view.isVisible {
    // ...
}

if view.isNotVisible {
    // ...
}

if view.isNotHidden {
    // ...
}

// with old
if view.isHidden {
    // ...
}

And you can also set on those properties to if you want:

view.isVisible = true

view.isNotVisible = true   

view.isNotHidden = true

// with old
view.isHidden = true

That way you can always say what you want without inverted logic! 🤓

That's it

Hope it will help you :)

If you want to find out more about me and some more Swift stuff then I invite you to my site: http://idoit.tech/en/

Cheers! :D

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

  • None
Last updated: Thu Nov 10 2022 14:14:43 GMT-0500 (GMT-05:00)