Reset/fix Xcode 4.5 code completion

不问归期 提交于 2019-12-01 22:19:12

问题


One of the new "features" in Xcode 4.5 was supposed to be vastly improved code completion. It was supposed to learn what you type regularly and provide these more frequently as options for code completion.

However, for me this isn't working at all.

One of the famously bad code completion words is NSString.

When I type it I get...

NS - NSAddedPersistentStoresKey
NSS - NSSaveChangesRequest
NSSt - NSStoreModelVersionHashesKey
NSStr - NSStream
NSStri - NSStrikethroughStyleAttributeName
NSStrin - NSString

I have never used any of the other suggestions given and most of them I'm not actually sure what they are. I use NSString many times a day, why wasn't it suggested first? In fact, apart from NSSet I don't think I've ever used another class that begins with NSS.

Also, when looking for NSLog() which used to get suggested when I typed NSL I now get...

NS - NSAddedPersistentStoresKey
NSL - NSLayoutAttribute
NSLo - NSLoadedClasses
NSLog - NSLog(<#id, ...#>)

Again, never heard of the others.

Is there any way to fix this so that I get the functionality that Apple says I should be getting?

Thanks for any help.


回答1:


OK, I deleted the UserInfo folder from ~/Library/Developer/Xcode/ and it seems to have fixed it.



来源:https://stackoverflow.com/questions/12515241/reset-fix-xcode-4-5-code-completion

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