简体   繁体   English

XCode 6.3自动完成功能无法正常工作

[英]XCode 6.3 autocomplete not working

I'm learning basics of Objective-C and using XCode for writing code. 我正在学习Objective-C的基础知识并使用XCode编写代码。 As you all know autocomplete option is perfect for new users that don't know (or remember) name of functions. 众所周知,自动完成选项非常适合不了解(或记住)功能名称的新用户。

I have a problem with using autocomplete in XCode 6.3 couse its just.. not working - it is not showing anything or showing things that are not connected. 我有一个问题,在XCode 6.3中使用自动完成功能只是...不工作 - 它没有显示任何东西或显示没有连接的东西。

For example I just wrote simple few lines of code gusing NSMutableArray and NSEnumerator, when I'm trying to remind myself function/message 'nextObject' of NSEnumerator, XCode is not suggesting anything. 例如,我只是简单地编写了几行代码来引用NSMutableArray和NSEnumerator,当我试图提醒自己NSEnumerator的函数/消息'nextObject'时,XCode并没有提出任何建议。

Here is a pic to show it: 这是一张图片来展示它: 在此输入图像描述

Am I doing sth wrong or there is a way to fix it? 我做错了还是有办法解决它?

thanks in advance! 提前致谢!

It must be a temporary glitch. 这一定是暂时的故障。 Happens to me almost all the time while Xcode is "indexing". 当Xcode“索引”时,几乎所有时间都发生在我身上。 You might be typing too fast and by the time Xcode gives indexing a break and looks for the auto-completion you might have types something for which there is no method (or something that you expected) Also, for custom classes & method, make sure you have included the respective header files. 你输入的速度可能太快了,当Xcode给出一个中断索引并查找自动完成时你可能有类型的东西没有方法(或你想要的东西)另外,对于自定义类和方法,请确保您已包含相应的头文件。

当代码中出现错误时,自动完成似乎不起作用。

The reason for autoComplete not working can be anything. autoComplete无法正常工作的原因可能是什么。 Do any one of the following to debug it 执行以下任一操作进行调试

  1. Check if there are errors and if so try to solve it and then check autoComplete. 检查是否有错误,如果是,请尝试解决,然后检查autoComplete。 If any error is present in any of the line then autoComplete will not work for below code. 如果任何行中出现任何错误,则autoComplete将不适用于以下代码。 Try autoComplete above the error incase you want to check. 尝试在想要检查的错误上方自动完成。
  2. If debugger does not throw any error then try commenting out the all lines and uncomment it from top to methods to recheck the autoComplete 如果调试器没有抛出任何错误,那么尝试注释掉所有行并从顶部取消注释到方法以重新检查autoComplete
  3. Quit Xcode and Reopen it 退出Xcode并重新打开它
  4. Clear Derived data and then launch Xcode and check 清除派生数据,然后启动Xcode并检查

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM