[英]XCode [[ClassName alloc] init]] keyboard shortcut / autocomplete
Does a keyboard shortcut exist or is there a way to create a custom shortcut for allocating and initializing a class? 键盘快捷键是否存在,或者是否可以创建用于分配和初始化类的自定义快捷键? Say we have:
说我们有:
MyCustomClass customClass =
At this point there should be an autocomplete option to: 此时,应该有一个自动完成选项:
MyCustomClass customClass = [[MyCustomClass alloc] init];
You can use a snippet, but you will need to type in your custom class anyways. 您可以使用代码段,但无论如何都需要输入自定义类。 A faster way for init is to use
[MyCustomClass new]
. 一种更快的初始化方法是使用
[MyCustomClass new]
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.