let native scrollview handle layout

This commit is contained in:
Hailey
2024-10-09 21:37:19 -07:00
parent 359ead3ef9
commit ad896cb8dd
6 changed files with 91 additions and 45 deletions
+9 -2
View File
@@ -6,9 +6,16 @@
//
class Util {
static func getScreenHeight() -> CGFloat {
static func getWindow() -> UIWindow? {
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let window = windowScene.windows.first {
let window = windowScene.windows.first {
return window
}
return nil
}
static func getScreenHeight() -> CGFloat {
if let window = Self.getWindow() {
let safeAreaInsets = window.safeAreaInsets
let fullScreenHeight = UIScreen.main.bounds.height
return fullScreenHeight - (safeAreaInsets.top + safeAreaInsets.bottom)