【发布时间】:2018-08-19 01:13:47
【问题描述】:
在我的应用程序中,我将 imageView 设置为这样的背景图像。
let backgroundImage = UIImageView(frame: UIScreen.main.bounds)
backgroundImage.image = UIImage(named: "backgroundView.jpg")
backgroundImage.contentMode = .scaleAspectFill
view.insertSubview(backgroundImage, at: 0)
但是当我在横向模式下旋转模拟器时,图像会被截断。 附言我还注意到,如果我在风景中运行我的应用程序,那么即使我旋转到纵向并返回它也非常适合。
【问题讨论】:
标签: ios swift uiimageview