简体   繁体   English

如何在iOS中使用图像视图并使其位于其他图层的后面,使其成为背景?

[英]How do I take in image view in iOS and make it go behind the other layers to make it the background?

There isn't really code for this it's more on the story board. 并没有真正的代码,故事板上的内容更多。

I have tried to go to the attributes and size modifier but I can't find anything that makes the UIImageView the background. 我试图去属性和大小修饰符,但找不到使UIImageView成为背景的任何东西。

只需将uiimageview拖到左侧,然后将其拖放到其他组件的顶部即可。

Just set an image as the backgroundColor, something like: 只需将图像设置为backgroundColor即可,例如:

self.view.backgroundColor = UIColor(patternImage: image)

See: https://developer.apple.com/reference/uikit/uicolor for more details. 请参阅: https//developer.apple.com/reference/uikit/uicolor了解更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM