Code snippets let you call your methods with typing 3 or 4 characters. They are most likely short cuts which you can customize contents as you wish and Xcode lets you to add your custom method calling shortcuts.
Xcode also have some basic code snippets. For example, If you type “typedef” for defining a enumaration, Xcode offers code snippets automatically.
When you finish your most used code. Drag and drop your method call frame to Snippet Library. Select View > Utilities > Show Code Snippet Library to open Code Snippet Library.
Our example method is findMidPoint. After finishing method implementation, In viewDidLoad method, write sample method call, drag and drop to Code Snippet Library.
You can add completion shortcut, edit scope and change your snippet’s name.
After 3 or 4 characters typing, you’ll reach your method call short-cuts.
PS: If you find this article useful please use like button 🙂 and if you have a question or a comment, don’t hesitate to share it!