If i use a for loop;
for(UIView *subview in [myView subviews])
in which order, subviews are brought?
According to their added order or something else?
As the documentation says, it reflects their visible order in the screen.
@property(nonatomic, readonly, copy) NSArray *subviews
Discussion
You can use this property to retrieve the subviews associated with your custom view hierarchies. The order of the subviews in the array reflects their visible order on the screen, with the view at index 0 being the back-most view.
For complex views declared in UIKit and other system frameworks, any subviews of the view are generally considered private and subject to change at any time. Therefore, you should not attempt to retrieve or modify subviews for these types of system-supplied views. If you do, your code may break during a future system update.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With