swiftui resize according to device screen code example Example: swift get device screen size let screenSize: CGRect = UIScreen.main.bounds