- Paste the code
- Highlight It
- Right click to open the context menu
- Select
Create Code Snippet
- Set the platform to
iOS
and the language toSwift
- Set the scope to
Function or Method
- Get in the source code editor
- CTRL+SHIFT+L to open the snippet list
- Select this snippet