Post

Replies

Boosts

Views

Activity

What does this error mean when using .searchable()
I am getting the following error when trying to use the .searchable() modifier in a SwiftUI application: Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem. If you want to see the backtrace, please set CG_NUMERICS_SHOW_BACKTRACE environmental variable. Here is the code that replicates the error for me: import SwiftUI struct ContentView: View { @State private var searchText = "" var body: some View { NavigationStack { Text("Searching for \(searchText)") .navigationTitle("Searchable Example") } .searchable(text: $searchText) } } Seems like a simple use of the modifier and I can't imagine this is a problem on my side. Is it just log noise to be ignored? If so is there some way to suppress these warnings? Or am I using the modifier incorrectly somehow?
3
0
850
Dec ’23