user2632918
user2632918

Reputation:

A error message comes always when i compile

I had added a formatter for decimal, but I deleted this and also change the formatter on the textfield. I got always this errormessage and after a while it will hide.

enter image description here

I have this formatter:

let formatter: NumberFormatter = {
    let formatter = NumberFormatter()
    formatter.numberStyle = .decimal
    return formatter
}()

And this is the code where the error would apear:

            VStack {
                HStack {
                    Text("Raddurchmesser")
                    TextField("Durchmesser", value: $durchmesser, formatter: formatter)
                        .textFieldStyle(DecimalTextFieldStyle(icon: Image(systemName: "pencil"), framesize: 110))
                }
            }
            .onTapGesture {
                hideKeyboard()
          

I restarted Xcode, also restarted the computer. I make "Clean Build Folder"

The build would be successfully. But where I have a chance to find out, why this line come up.

The decimalFormatter is also in no line of Code.

Upvotes: 0

Views: 24

Answers (1)

bjorn.lau
bjorn.lau

Reputation: 1188

In Xcode go to the top menu and select: Product -> Clear All issues.

This is sometimes needed when Xcode can't "forget" things like this.

Upvotes: 0

Related Questions