7

I've got some issues with the new autocomplete of Xcode 7.3

When I import a class, the class won't show up in autocomplete. Even more annoying, when an imported class contains a typedef NS_ENUM, the possible values won't show up either. In both cases, when I manually enter the class name or enum value, that perticular value will show up the next time, but for the possible enum values, all other values still won't show.

Further, I've noticed the autocomplete isn't ordered (alphabetically) anymore.. So, for example, when I've got a class with initializers in the .h file:

-(instancetype)initWithServiceName:(NSString*)serviceName listenPort:(NSUInteger)listenPort keys:(NSArray*)keys;  
-(instancetype)initWithServiceName:(NSString*)serviceName listenPort:(NSUInteger)listenPort keyFile:(NSString*)keyFile;

when I start typing "-(instancetype)init" in the .m file, the autocomplete will show the first initializer, followed by about 14 autocompletions that doesn't even relate to it by far and then (finally) the second initializer...

Is there a way to use 7.3 (or at least the SDKs within it) but switch back to the old (but very lovely, and working) autocomplete feature from 7.2?

4

4 回答 4

2

我自己也遇到了这个问题,在查看了所有其他类似的问题和答案后,我找不到解决方案。然而,我终于找到了对我有用的东西。

Xcode -> Preferences -> Components。在那里,您可能会发现一个如下所示的屏幕:

在此处输入图像描述

这表明文档尚未下载,因此,任何尝试重新索引或重新构建应用程序而不下载文档都会阻止您使用自动完成功能。

一旦我下载了 Xcode 7.3 文档和 OSX 10.11.4 文档,这足以让我恢复自动完成功能(我正在尝试构建一个 OS X 应用程序,所以请随意下载与您相关的尽可能多的文档)。

于 2016-09-09T22:44:10.517 回答
1

我解决了这个问题,去 XCode -> Preferences -> Text Editing,取消Enable type-over completions

当您创建新文件时也会发生这种情况,然后新文件将失去自动完成功能。

单击cmd+shift+k尝试清理项目并构建它,

在此处输入图像描述

如果这不起作用,请从 /Users//Library/Developer/Xcode/DerivedData 中删除派生数据

或在此处删除: 在此处输入图像描述

自动完成将恢复正常!

于 2016-04-10T13:45:35.653 回答
-1

尝试清理项目并构建它,如果这不起作用,请从 /Users//Library/Developer/Xcode/DerivedData 中删除派生数据,然后重试。应该管用

于 2016-03-27T12:32:36.747 回答
-1

从 7.2 升级到 7.3 后,我遇到了很大的问题,这完全破坏了我的工作效率。但是在我删除所有派生数据,完全退出 XCode,然后重新启动系统后,一切恢复正常。生活又好起来了……

于 2016-04-19T19:42:09.363 回答