Hi!
I noticed that when I use the simple Textfield in SwiftUI it generates unexpected error:
-[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID
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 example to repoduce the error:
import SwiftUI
struct ContentView: View {
@State private var firstName = ""
var body: some View {
TextField("First name", text: $firstName)
}
}
How it could be fixed ? Is it one of the bugs that came along with iOS 17 ?
Thank you!
Post
Replies
Boosts
Views
Activity
Hi!
I am getting the next warning returned when the textfield is focused. Xcode version: 14.3.1. Should I ignore it ?
2023-09-06 20:55:04.483056+0200 Delete1[6598:29619] [Query] Error for >queryMetaDataSync: 2
2023-09-06 20:55:04.487287+0200 Delete1[6598:29619] [Query] Error for >queryMetaDataSync: 2
2023-09-06 20:55:04.974905+0200 Delete1[6598:30000] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x6000026e3f60> F8BB1C28-BAE8-11D6-9C31-00039315CD46
import SwiftUI
struct ContentView: View {
@State private var username: String = ""
@FocusState private var usernameInFocus: Bool
var body: some View {
VStack {
TextField("Addd", text: $username)
.focused($usernameInFocus)
.padding(.leading)
.frame(height:55)
.frame(maxWidth: .infinity)
.background(Color.gray.brightness(0.3))
.cornerRadius(10)
Button("toggle"){
usernameInFocus.toggle()
}
}
.padding(44)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Hi!
I was exploring the DatePicker functionality in SwiftUI from official documentation:
https://developer.apple.com/documentation/swiftui/datepicker
When I tried using graphical datepicker style, I got the warning message generated for the next code ( copied from documentation example)
var body: some View {
DatePicker(
"Start Date",
selection: $date,
displayedComponents: [.date]
)
.datePickerStyle(.graphical)
}
I got the next warning message:
[UICalendarView] UICalendarView's height is smaller than it can render its content in; defaulting to the minimum height.
Could I please ask you how to fix that ? I tried setting the frame to .frame(width: 320) but that is not what I want to achieve.
Would be grateful for any advice!
Thank you!