问题
Whenever I am typing and want to access functions for a specific object, Xcode adds a second dot after the first one that I have typed. This is frustrating because I have to manually remove one of them every time.
Is there a way to change this?
回答1:
If your swift files contain Unicode characters, auto completion will fail even if the characters are comments. So just delete all the Unicode characters, and the auto completion feature will work well !
回答2:
I have found that when I had the following code the bug happened:
var someString = "0º"
but when I removed the "º" character
var someString = "0"
it didn't put the double dots anymore
回答3:
Not enough reputation to comment... Meintus is correct in that I had the double dot issue, and removing non ASCII characters did help. I'm just here to add the easy way to achieve this. I hadn't typed any non ASCII characters, it turns out it was an example I had copied as a comment for reference.
I found them by clicking on the magnifying glass next to where you type your search. Select insert pattern, then select "Non-ASCII" Characters
Once I did this and deleted them, the .. Autocomplete stopped :)
回答4:
This issue has been fixed in the official release of Xcode 6
来源:https://stackoverflow.com/questions/24039502/xcode-6-adds-two-dots-periods-when-coding-in-swift-for-prediction