Xcode 中的自动完成未按预期工作(使用其他 IDE) [英] Autocomplete in Xcode not working as expected (from using other IDE's)

查看:15
本文介绍了Xcode 中的自动完成未按预期工作(使用其他 IDE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先让我声明我是一个关于 Objective-C 和 Xcode 的绝对新手,因为我来自 Flash Builder (IDE)/AS3 背景.我最近开始学习 Objective-C 并使用 Xcode.

First off let me state that I am an absolute newbie regarding Objective-C and Xcode as I'm coming from a Flash Builder (IDE) / AS3 background. I have recently started learning Objective-C and using Xcode.

我现在正在编写我的第一个程序,并注意到 Xcode 中的自动完成功能没有像我预期的那样工作.它向我展示了似乎与我使用的 Class 类型无关的各种值.

I'm now writing my first program and notice that the autocomplete function in Xcode is not working as I would expect it. It is showing me all kinds of values seemingly unrelated to the type of Class I'm using.

如果我声明:

NSFileManager *manager;

然后如果我输入manager = [NSFileManager 并在此处输入 command+space 我希望 defaultManager 是建议之一.并且建议应该只是 NSFileManager 类的方法和属性.这就是我在 Flash Builder 中习惯的方式.

then if I type manager = [NSFileManager and type command+space here I expect defaultManager to be one of the suggestions. And the suggestions should only be methods and properties of the NSFileManager class. This is how I was used to it in Flash Builder.

这是 Xcode 中的错误、一些配置错误还是 Xcode 不应该工作?

Is this a bug in Xcode, some misconfiguration or just not as Xcode is supposed to work?

推荐答案

我在项目中间将 Xcode 4 升级到 5,发现我在子组(相当于项目中的子文件夹)中创建的任何新文件都没有自动完成,而顶部文件夹中的新文件会自动完成.我通过设置解决了这个问题:

I upgraded Xcode 4 to 5 whilst in the middle of a project and found any new files I created in subgroups (equating to subfolders in the project) didn't autocomplete whilst new files in the top folder did autocomplete. I fixed this by setting:

构建设置 ==>搜索路径 ==>始终搜索用户路径.现在所有文件都会自动完成.

Build Settings ==> Search Paths ==> Always Search User Paths to Yes. All files now autocomplete.

这篇关于Xcode 中的自动完成未按预期工作(使用其他 IDE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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