Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
Problem:
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". If, for example, my code is:
Code:
let path = Bundle.mainBundle.pathForResource(...inDirectory:)
let deluge = something
and I replaced line 1 with
Code:
let path = Bundle.mainBundle.pathForResource(...subdirectory:)
and then corrected the method call, now line 2 looks like:
Code:
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.
My Xcode version is 8.2.1
My attempts at a solution:
Under System Preferences->Keyboard, I unchecked "Correct spelling automatically".

Somehow, after hitting some keys, I was able to "fix" this for one of my lines of code, but I am unable to reproduce my solution.

Is this a feature?
Will someone please help me? Thanks.

Update:
After doing a little more playing around with the source code, I discovered that Xcode is simply replacing characters I select with "i". 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".
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.