00486e9499
Co-authored-by: Samuel Newman <mozzius@protonmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Hailey <me@haileyok.com>
19 lines
470 B
Swift
19 lines
470 B
Swift
//
|
|
// Util.swift
|
|
// Pods
|
|
//
|
|
// Created by Hailey on 10/2/24.
|
|
//
|
|
|
|
class Util {
|
|
static func getScreenHeight() -> CGFloat? {
|
|
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
|
let window = windowScene.windows.first {
|
|
let safeAreaInsets = window.safeAreaInsets
|
|
let fullScreenHeight = UIScreen.main.bounds.height
|
|
return fullScreenHeight - (safeAreaInsets.top + safeAreaInsets.bottom)
|
|
}
|
|
return nil
|
|
}
|
|
}
|