96.8% of iOS users can use this modifier
iOS 15+ required
.searchable() Basic searchable modifier
Apply the .searchable() modifier to a view
Text("Hello, World!")
.searchable()If your app supports iOS versions older than 15, you can use #available to conditionally apply this modifier:
if #available(iOS 15, *) {
myView.searchable()
} else {
// Fallback for older iOS versions
myView
}Check the code examples above for specific #available patterns with this modifier.
The .searchable() modifier requires iOS 15 or later. This means 96.8% of current iOS users can use this modifier.
Yes! Use #available(iOS 15, *) to conditionally apply this modifier only on devices running iOS 15 or later, with a fallback for older versions.
Apply the .searchable() modifier to any SwiftUI view. Check the code examples above for usage patterns.
Visit the official Apple documentation for detailed information.