Post

Replies

Boosts

Views

Activity

Reply to Invalid Numeric Value (NaN) Error in SwiftUI's TextField on Long-Press
Has anyone had any luck resolving this? I am in Xcode 16.3, testing on an actual device (iPhone 15 pro with iOS 18.5), but also see on a simulator going back to older iPhones and iOS 17. The error is occurring on any text field, when autocorrect kicks in, or when I highlight text. 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. Even if I create a new swift project, and add the most. basic text field, I get the error. I can fix by disabling auto-correct, but obviously that is not the best UX. I have attempted various methods of changing the wrapper around the code, adding padding, etc. Thank you!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’25