swift get width of screen code example
Example 1: swift get device screen size
let screenSize: CGRect = UIScreen.main.bounds
Example 2: swiftui width screen
extension UIScreen{
static let screenWidth = UIScreen.main.bounds.size.width
static let screenHeight = UIScreen.main.bounds.size.height
static let screenSize = UIScreen.main.bounds.size
}