yattee/Shared/PreferenceKeys.swift

10 lines
217 B
Swift
Raw Normal View History

2022-11-13 17:52:15 +00:00
import Foundation
import SwiftUI
struct RectKey: PreferenceKey {
static var defaultValue: CGRect = .zero
static func reduce(value: inout CGRect, nextValue: () -> CGRect) {
value = nextValue()
}
}