Joke Collection Website - Public benefit messages - Xcode how to set the autocomplete statement

Xcode how to set the autocomplete statement

XCode's code hint is called Code Sense. You can modify these settings by pressing command+ in the settings: after the settings are completed, enter a keyword and the code will open automatically. For example, if you type NSBun, the prompt for dle will automatically appear. At this point, if you press the TAB key, it will automatically help you enter the NSBundle.

In other commonly used IDE tools, the relevant method prompts are as follows. For example, in Microsoft Visual Studio, if you want to get the method supported in Form 1, you only need to enter it.

Form 1.

After clicking (. ), the related methods will appear in the list. In fact, XCode also supports such a list, but it needs to be activated by a hotkey.

For example, if we want to get a message prompt related to NSBundle, we just need to press the hot key after the space: ctrl+ESC or ctrl+, (comma key), and the prompt will come out.

Similarly, attributes with attributes can activate the prompt list by pressing ctrl+ESC or ctrl+ after. (Point attribute).

But the headache is that there are too many related and unrelated methods, properties and so on. It's too much trouble to find what you need in it. In fact, XCode has another hotkey to get more related methods (that is, you may need them). This hotkey is ctrl+. (Click). Pressing this hotkey after the space will prompt you for the message or method you most likely need. Press the hotkey continuously, and these prompts will appear in cycles.

In some cases, some methods have multiple different parameters. You can switch between different parameters by pressing ctrl+/ (slash key).

If you are used to the usage of these hotkeys, I believe you will also feel that XCode's code auto-completion function is actually not bad.