简体   繁体   English

烦人的Xcode自动补全@string和@selector?

[英]annoying Xcode autocompletion @string and @selector?

Lets say you go to enter in a parameter and it's a string, so you go @ and with a press of the return key Xcode fills the template of a string for you @"String" . 假设您输入一个参数,它是一个字符串,所以您输入@并按return key Xcode将为您填充字符串模板@"String" This is the "first option" on the popup suggestions. 这是弹出建议中的“第一个选项”。

Next you want to enter in a @selector for a performSelector: method, when you type in @ the default is a string so you have to go down on your keypad, that's okay. 接下来,您要为performSelector:方法输入@selector ,当您输入@ ,默认值为字符串,因此您必须down键盘,这没关系。

The next time you want to enter in a string, the default is @selector now when you hit the return key after typing @ 下次您要输入字符串时,现在默认为@selector当您在键入@后按return key

I know I am being a little bit pedantic but as the quote goes: 我知道我有点书呆子,但正如引文所说:

The three chief virtues of a programmer are: Laziness, Impatience and Hubris. 程序员的三个主要美德是:懒惰,不耐烦和傲慢。

So to my question is there a way to always make the @string "default" or an even quicker shortcut other than @" ? 所以对于我的问题,有没有一种方法可以使@string始终为“默认”或除@"之外甚至更快的快捷方式?

ty. TY。

what XCode does is , in the suggestion box,what ever you selected the last time it comes selected now.What you selected now has more chance of using it next time, so xcode suggest the same the next time. XCode的作用是,在建议框中,无论您上次选择的是什么,现在都选择。现在选择的内容下次使用的可能性更大,因此xcode下次建议使用。 I don't think you can set something as default. 我认为您不能将某些内容设置为默认值。

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

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