let native scrollview handle layout
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user