IPhone - how can I hide a view and allow this space to use a different view (e.g. android = GONE visibility)

Do you know a simple (or not simple) way to hide a view (or something like a view) and allow other screen views to use empty space? And do the opposite, showing this opinion. Something like Android Visibility = GONE for layers.

As far as I know, using setHidden = YES only hides the view from the screen, but doesn't change anything around.

On Android, there are 2 sorting methods. One kind of visibility = HIDE, and another: visibility = GONE.

Let's say we have 3 views each with a height of 100 pixels. On Android: If you set view2 visibility = HIDE, it just hides and nothing else happens. If you set view2 visibilty = GONE, view2 is hidden from the screen and view3 is automatically opened, freed by view2.

What I'm looking for on an iPhone. I suppose there is no way to do this, but do you know any piece or code that makes this possible?

thanks

+4
source share
1 answer

There is no automatic tile in iOS, so the only way to do this is to resize each of the views the way you want them to be themselves, perhaps by implementing layoutSubviews in your supervisor.

+3
source

Source: https://habr.com/ru/post/1336224/


All Articles