我试图让屏幕宽度在 iPhone 6 上显示不同的图像。但是,当我检查宽度或高度时,UIScreen.mainScreen().bounds
始终为零。知道为什么吗?
最佳答案
let height = UIScreen.mainScreen().bounds.height
let width = UIScreen.mainScreen().bounds.width
关于ios - UIScreen.mainScreen().bounds 始终为零,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27591904/