问题
Greetz,
So this is rather a simple question (maybe not a simple answer). I want the IB option called 'send to back' (On IB, go to Layout -> Send to back) to be done programmatically.
Is it possible? If not, any suggestions to simulate the same thing?
This is for an UIImageView as the title states.
回答1:
Use sendSubviewToBack:
[yourSubView.superview sendSubviewToBack:yourSubView];
回答2:
[self insertSubview:view atIndex:index];
Just experiment with the index you need.
来源:https://stackoverflow.com/questions/5565505/how-to-put-uiimageview-on-the-background-of-the-layout