AppCode’s code generation features allow you to avoid having to type in lots of the standard code constructs. In addition to the standard file types, you can create custom templates or modify code in existing ones in Preferences | Editor | File and Code Templates: Let’s say you want to modify the copyright notice for Swift classes.
Go to the Includes tab and select the Swift File Header template: Here you can modify the code for all Swift classes and other file types that use this include.
You can create this type right away by pressing ⌥⏎ and choosing one of the three available options: If, for example, you want to create a class in a separate file, select Create type ‘’ in a file and specify the group this file will belong to in the dialog that opens: AppCode will generate the standard code for the newly created class: Now let’s look at how you can generate code inside classes.
When you call a method or property that is not declared in this class, press ⌥⏎, and in the list that appears, select Create property ‘’ or Create method ‘’: The boilerplate code for the new class member will be added: You can create initializers from inside class code.