标签: swift xcode
在UITest中,我试图检查设备的屏幕尺寸,但是此代码没有获得正确的尺寸。
let boundsHeight = UIScreen.main.bounds.size.height
当我在Xcode模拟器上尝试上述代码时,无论设备如何,boundsHeight每次均为480,即使在iPhone SE中应该为568。
是什么导致UITest无法正确获得尺寸?