Add a UIImageView as a sibling to your subviews that is the size of the main view, and apply your Image to this view.将UIImageView作为同级添加到子视图中,即主视图的大小,然后将Image应用于此视图。
All sibling views set the Background color to have an alpha of 0. This will make the view transparent, but not affect any elements they contain.所有同级视图都将背景颜色设置为alpha为0.这将使视图透明,但不会影响它们包含的任何元素。