2

When I try to use the "leading dot syntax" in swift I don't get any autocomplete suggestion. Is there no autocomplete for this implemented or is it a problem with my Xcode (Version 6.3.1)?

For example when I try something like this:

let col: UIColor? = .whiteColor()

I don't get any suggestion for any method after I hit the dot, so I've to write the method name by myself (what's kinda hard because I'm not very familiar with Swift right now).

When I write it like following, the autocomplete works fine

let col: UIColor? = UIColor.whiteColor()

I already tried to delete ~/Library/Developer/Xcode/DerivedData/* and ~/Library/Caches/com.apple.dt.Xcode but it didn't help.

So, is there no autocompletion for this feature implemented or am I doing something wrong?

Edit: I don't have a general problem with the autocompletion, it's only when I want to call a static method or an enum with a leading dot like in the example above. Everything else works fine.

Pascal_AC
  • 541
  • 4
  • 17
  • possible duplicate of [Xcode 6.3 code completion too slow](http://stackoverflow.com/questions/29579572/xcode-6-3-code-completion-too-slow) – Vizllx May 04 '15 at 07:51
  • 1
    I don't see a duplicate there, but maybe I just overlooked it. From what I read there it's about a general autocomplete problem. My autocompletion works fine, only the leading dot syntax doesn't work and I don't read anything about that at the question you linked there. – Pascal_AC May 04 '15 at 08:04
  • leading dot syntax also means autocompletion btw. Anyways, I have marked because I found it very similar what you have said. But no worries If other SF users don't find it Duplicate then it fine for you. Cheers! – Vizllx May 04 '15 at 08:10

2 Answers2

1

I believe this is an ongoing issue with implied enumerators and autocompletion. No current Xcode build nor any prerelease build fixes this problem. We just have to wait until Apple releases a new beta and I'll update this if it is fixed.

Schemetrical
  • 5,506
  • 2
  • 26
  • 43
0

For you information, an open radar is registered for this kind of problem. Still Xcode 7 beta 4 has the problem.

http://www.openradar.me/21976034

Yoichi Tagaya
  • 4,547
  • 2
  • 27
  • 38