* feat: new protocol for chained functions, and added support for explicit Y ranges. X coming as well * feat: add new axis interface (#253)
11 lines
286 B
Swift
11 lines
286 B
Swift
import SwiftUI
|
|
|
|
public struct ViewGeometry<T>: View where T: PreferenceKey {
|
|
public var body: some View {
|
|
GeometryReader { geometry in
|
|
Color.clear
|
|
.preference(key: T.self, value: [ViewSizeData(size: geometry.size)] as! T.Value)
|
|
}
|
|
}
|
|
}
|