diff options
Diffstat (limited to 'Jel/Models')
-rw-r--r-- | Jel/Models/UIScreenWidthExtension.swift | 15 | ||||
-rw-r--r-- | Jel/Models/ViewOffsetKey.swift | 17 |
2 files changed, 15 insertions, 17 deletions
diff --git a/Jel/Models/UIScreenWidthExtension.swift b/Jel/Models/UIScreenWidthExtension.swift new file mode 100644 index 0000000..6f2f5de --- /dev/null +++ b/Jel/Models/UIScreenWidthExtension.swift @@ -0,0 +1,15 @@ +// +// UIScreenWidthExtension.swift +// Jel +// +// Created by zerocool on 2/14/24. +// + +import Foundation +import UIKit + +extension UIScreen{ + static let screenWidth = UIScreen.main.bounds.size.width + static let screenHeight = UIScreen.main.bounds.size.height + static let screenSize = UIScreen.main.bounds.size +} diff --git a/Jel/Models/ViewOffsetKey.swift b/Jel/Models/ViewOffsetKey.swift deleted file mode 100644 index b118478..0000000 --- a/Jel/Models/ViewOffsetKey.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// ViewOffsetKey.swift -// Jel -// -// Created by zerocool on 12/24/23. -// - -import SwiftUI - -/// A preference key to store ScrollView offset -public struct ViewOffsetKey: PreferenceKey { - public typealias Value = CGFloat - public static var defaultValue = CGFloat.zero - public static func reduce(value: inout Value, nextValue: () -> Value) { - value += nextValue() - } -} |