O'Reilly logo

Building Apple Watch Projects by Stuart Grimshaw

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making use of code snippets

Lots of code that you write gets written over and over again. A very convenient place to store frequently used code is in the Code Snippet Library (Command-Option-Control-2).The image below shows the details of a snippet that has been assigned a keyboard shortcut. When this snippet is inserted, the cursor is placed at the text, ready for typing.

Making use of code snippets

To create a new snippet, select the relevant code in the source code editor and then drag it onto the Code Snippet Library.

After a while, you'll find that you have a substantial number of keyboard shortcuts at your command for typing code that you use frequently. Although the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required