How to put UIImageView on the background of the layout

ε祈祈猫儿з 提交于 2019-12-13 05:24:41

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!