Code completion drop down suggestions not working properly Xcode 8.0 Swift 3

亡梦爱人 提交于 2019-12-10 16:15:40

问题


Im having a problem with the code completion drop down suggestion menu when you are writing code in Xcode. It used to be you could type something like:

button.frame = CGRect(

and once your at this point instead of filling in all the arguments manually, the code completion suggestions drop down menu should appear and provide suggestions of auto completion then you simply just click on the one that suits your needs and you end up with something like: (from the example above)

button.frame = CGRect(x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat)

then all you have to do is simply fill in the parameters. After I updated from Xcode 7.3.1 to the latest version (Xcode 8) for some reason I lost this amazing feature; however, Xcode still shows the code completion suggestions drop down menu but it is not the same, it just contains variables that I have written and attributes that don't even pertain to the object that I am editing.

Further more, Xcode 8.0 for me at least no longer highlights: Attributes, Project Class Names, Project Function and Method Names, Project Constants, Project Type Names, Project Instant Variables and Globals, and a few other types in the source editor. However keywords, strings, and numerical types remain highlighted as before the update.

I have tried monkeying around in the Preferences tab but I can not find options that will fix these frustrating issues. Please help!


回答1:


It should be just temporary issue:

Clean your build / build folder, reopen Xcode. It ensures your code will be indexed again and this is used to result in quick syntax highlighting and smart suggestion features.




回答2:


It is because of Indexing.... just go to your project name at the top of navigation and Clean (cmd+shift+k) then come again to the file where you wanna work type any word you will see suggestion popUp. that it..



来源:https://stackoverflow.com/questions/39550552/code-completion-drop-down-suggestions-not-working-properly-xcode-8-0-swift-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!