Taming XCode’s auto-complete options
I am fairly new t开发者_如何转开发o XCode and the Objective-C language.
When I am instantiating a class, for example an NSMutableArray, XCode will provide a whole lot of auto-complete options. Even for an empty class which simply extends an NSObject has many options, most of which seem completely useless.
What is the reason for having so many auto-complete options, or can they be "tamed" in the preferences?
EDIT: this is unintentionally a duplicate.
The auto-complete makes coding way faster. For example, in [[NSMutableString alloc] initWithCapacity:5], I only had to type the characters that are in bold face, which is ~ 10/38 = ~26%, so it saves a lot of typing.
That said, it is sometimes unwelcome. You can adjust in "Code Sense" in the Xcode preferences (type COMMAND+COMMA while Xcode is open and in the foreground). You can set the delay for suggestions and also whether it should remember functions you've previously used in that project. You can also disable it completely, if you want to. I don't think you can limit the number of functions it considers, though.
精彩评论