mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
added argument to voice over on the search bar automatically
- also removed the geomtry reader in favour of a `readWidth` function
This commit is contained in:
@@ -31,4 +31,15 @@ extension View {
|
||||
height.wrappedValue = newValue
|
||||
}
|
||||
}
|
||||
|
||||
/// Reads the width of the view and stores it in the `width` binding.
|
||||
/// - Parameters:
|
||||
/// - width: a `CGFloat` binding
|
||||
func readWidth(_ width: Binding<CGFloat>) -> some View {
|
||||
onGeometryChange(for: CGFloat.self) { geometry in
|
||||
geometry.size.width
|
||||
} action: { newValue in
|
||||
width.wrappedValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user