TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

SOLVED: Day 97 bug

Forums > 100 Days of SwiftUI

Curious if anyone else is seeing this. It seems to only do this when I search for Snowbird, and it only does it the first few times...

If I search for Sn up comes Snowbird, I click on details and it shows the Snowbird details for about 1 second then backs up to the search results and shows only St Anton.

If I then search for something else they work fine, and when I search for Snowbird again it works fine.

I noticed also when it does it, and when it backs up, the Search bar no longer shows the Sn that I typed but shows An

3      

This sounds like a case of iPhone's spell checker correcting your spelling from "Sn" to "An" as soon as your focus leaves the text field.

Try this https://www.hackingwithswift.com/quick-start/swiftui/how-to-disable-autocorrect-in-a-textfield

3      

Yes that was exactly it:

 }
          .navigationTitle("Resorts")
          .searchable(text: $searchText, prompt: "Search for a resort")
          .autocorrectionDisabled(true)

That fixed it....Odd that it only did the auto correct AFTER I clicked the search result to go to the detail screen. Also odd that it only did it once...once I searched for something else it would be fine....like it only autocorrects onces per rendered screen.

3      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.