As mentioned in an Alladinian comment, you can achieve this with the special "code snippet" in Xcode. To identify a piece of code, first enter the text in the source file, for example
@property (nonatomic, strong) <#type#> *<#name#>;
( <#...#> is a special placeholder, so you can switch to "type" and "name" using the tab key later.)
Then you select the entire line and drag it into the "Code Snippet Library":

Double-click the new code snippet and give it a name and a shortcut:

Now, when you type the shortcut, Xcode will suggest the completion:

Select the code fragment and it will be inserted into the source file:

You can use the tab to go to "type" and "name".
source share