I made some changes to some source code today, and noticed that when I replaced "inDirectory" in a Bundle.mainBundle.pathForResource call with "subdirectory" and subsequently put it back in, Xcode replaced letters other unrelated areas of code with the letter "i". For example, if my code is:
let path = Bundle.mainBundle.pathForResource(...inDirectory:) let deluge = something
and I replaced line 1 with
let path = Bundle.mainBundle.pathForResource(...subdirectory:)
and then corrected the method call, now line 2 looks like:
let diluie = somithing
If I then try to replace the i's in line 2 with what's supposed to be there, Xcode "corrects" my "mistake" and puts the i's back in.
Edit: Under System Preferences->Keyboard, I unchecked "Correct spelling automatically", but that did not help.
Edit #2: I'm using Xcode 8.2.1
Update:: After playing around with my project some more, I discovered Xcode is just replacing characters I select with the undesired character. For example, in line 2 the above code, if I select "u" by placing my cursor immediately before it, then move the cursor elsewhere, Xcode will replace the "u" with an "i". Will someone please tell me how to stop this from happening?