File tree 3 files changed +5
-5
lines changed
Sources/SwiftUIKit/Extension
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ UIColor.red.bindGeometry(to: $height) { $0.size.height }
16
16
17
17
Breaking changes:
18
18
19
- * The ` readSafeAreaInsets ` ` View ` extension is renamed to ` bindSafeAreaInsets ` .
19
+ * The ` readSafeAreaInsets ` ` View ` extension is renamed to ` bindSafeAreaInset(of:to:) ` .
20
20
21
21
22
22
## 0.3.0
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ public extension View {
15
15
to an external binding.
16
16
*/
17
17
func bindGeometry(
18
- to value : Binding < CGFloat > ,
18
+ to binding : Binding < CGFloat > ,
19
19
reader: @escaping ( GeometryProxy ) -> CGFloat ) -> some View {
20
20
self . background ( GeometryBinding ( reader: reader) )
21
21
. onPreferenceChange ( GeometryPreference . self) {
22
- value . wrappedValue = $0
22
+ binding . wrappedValue = $0
23
23
}
24
24
}
25
25
}
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ public extension View {
19
19
the previously ignored safe areas. Just use the binding
20
20
to set the edge padding of the view you want to inset.
21
21
*/
22
- func bindSafeAreaInsets (
23
- for edge: Edge ,
22
+ func bindSafeAreaInset (
23
+ of edge: Edge ,
24
24
to binding: Binding < CGFloat > ) -> some View {
25
25
self . bindGeometry ( to: binding) {
26
26
self . inset ( for: $0, edge: edge)
You can’t perform that action at this time.
0 commit comments