IOS implements the Gone function in Android, and ios implements androidgone.
It is common to hide a view without occupying the position (view. GONE in Android), but this is not the case in iOS, only hidden. Therefore, I wrote a category that is generally used. In special cases, I have to check the situation.
In fact, the practice is very simple, just add the constraints of length, width, and zero. (It is best to lower the priority of other constraints, otherwise the warning "Probably at least one of the constraints in the following list is one you don't want" will be reported, but it can also achieve the effect without adding)
How can I cancel Gone? There can be no tags for the constraint, but identifier can be distinguished. just remove the constraint set by identifier.
See: https://github.com/liangjiawei19920721/UIView-Gone for code