Xcode 7.3 自动完成问题 [英] Xcode 7.3 autocomplete issues

查看:20
本文介绍了Xcode 7.3 自动完成问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 Xcode 7.3 的新自动完成功能时遇到了一些问题

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

当我导入一个类时,该类不会显示在自动完成中.更烦人的是,当导入的类包含 typedef NS_ENUM 时,可能的值也不会显示.在这两种情况下,当我手动输入类名或枚举值时,该特定值将在下次显示,但对于可能的枚举值,所有其他值仍然不会显示.

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.

此外,我注意到自动完成不再排序(按字母顺序).因此,例如,当我在 .h 文件中有一个带有初始值设定项的类时:

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;

当我开始在 .m 文件中输入-(instancetype)init"时,自动完成将显示第一个初始化程序,然后是大约 14 个到目前为止甚至与它无关的自动完成,然后(最后)第二个初始化程序...

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...

有没有办法使用 7.3(或至少其中的 SDK)但从 7.2 切换回旧的(但非常可爱且有效)自动完成功能?

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?

推荐答案

我自己也遇到了这个问题,并且在浏览了所有其他类似的问题后 &关于这个的答案,我找不到解决方案.然而,我终于找到了对我有用的方法.

I had this problem myself and after looking through all the other similar questions & answers about this, I couldn't find a solution. However, I finally found what worked for me.

转到 Xcode ->首选项 ->组件.在那里,您可能会看到如下所示的屏幕:

Go to Xcode -> Preferences -> Components. There you will probably find a screen that looks like the following:

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

This shows that the documentation has not has not been downloaded and therefore, any attempts to re-index or re-build the application without downloading the documentation would prevent you from being able to use the autocompletion functionality.

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

Once I downloaded the Xcode 7.3 Documentation and the OSX 10.11.4 Documentation, this was enough for me to get the autocomplete functionality back (I was trying to build an OS X app, so feel free to download as much documentation as is relevant for you).

这篇关于Xcode 7.3 自动完成问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆