GoneVisible 1.2.0

GoneVisible 1.2.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2018
SPMSupports SPM

Maintained by Teruto Yamasaki.




GoneVisible

GoneVisible is a UIView extension that uses AutoLayout to add “gone” state like Android.

You can easily change the size constraint constant of UIView to 0 without adding IBOutlet property of size constraint. GoneVisible supports iOS and is written in Swift.
 
 

Requirements

  • Swift 3.0
  • iOS 8.0+
  • Xcode 8

Installation

Manual

Simply drag UIView+GoneVisible.swift into your project.

Usage

・Gone.

view.gone()

・Visible.

view.visible()

・When setting to Gone, set the space constraint constant together to 0.

view.gone(spaces: [.trailing])

・With “gone” you can specify whether it is vertical or horizontal. It is useful when animating.

view.gone(axis: .vertical)
See also:

Author

Teruto Yamasaki, [email protected]

License

The MIT License (MIT)
See the LICENSE file for more info.