実装
let bounds = UIScreen.main.bounds
let width = bounds.size.width
let height = bounds.size.height
print(width)
print(height)
参考
How to get device width and height?
Copyright© offブログ! , 2021 All Rights Reserved Powered by AFFINGER5.