yattee/iOS/SafeAreaModel.swift

16 lines
331 B
Swift
Raw Normal View History

import Foundation
import SwiftUI
final class SafeAreaModel: ObservableObject {
static var shared = SafeAreaModel()
@Published var safeArea = EdgeInsets()
2023-05-20 22:18:10 +00:00
var horizontalInsets: Double {
safeArea.leading + safeArea.trailing
}
var verticalInsets: Double {
safeArea.top + safeArea.bottom
}
}