I do not quite understand sendSubviewToBack. Please see code

You can see my screenshot of the xib file.

enter image description here

I am doing some manipulations in viewDidLoad

-(void) viewDidLoad { [smallView removeFromSuperview]; [bigView sendSubviewToBack:smallView]; } 

Will the hierarchy change from view-> bigView-> smallView to view-> smallView-> bigView?

+4
source share
1 answer

No hierarchy will be affected. The documentation says:

sendSubviewToBack:
Moves the specified preview so that it appears behind his brothers and sisters.

Changes the tint order. If you have two views that overlap and have the same supervisor, then you can determine which of these two views should be in front.

+5
source

All Articles