Snippets are reusable blocks of code, and can be used across projects to avoid typing the same code more than once. This movie shows how to get snippets working in your projects.
- [Narrator] Sometimes when you're developing applications…you notice that you're writing the same code over…and over and over again.…Maybe there's a utility method that you like to use…in all the apps that you develop.…You're sick of having to type that out the whole time,…every time you want to use it.…Well, Xcode has a feature called snippets…that enable you to save a code block for easy use later on.…Let's say this is the code block I want to recycle.…Yes, I admit, it's totally useless,…but as an example it works perfectly.…
What we need to do is go to the code snippets library.…That's accessible through the library,…which is at the bottom of the utility area.…In the library bar, choose the open and close brackets.…This is going to show the code snippet library.…Then, simply select all of your code,…and then drag it right in here.…So you'll see that, that box is highlighted…when you're dragging it.…Release your mouse button,…and then you're taken to your code snippets.…
So it says My Code Snippet right here.…
Author
Released
11/18/2016These Xcode tutorials help new developers install Xcode and start writing and editing code. Instructor Todd Perkins shows how to build a brand-new user interface (UI) with buttons and menus in Interface Builder, Xcode's intuitive UI design tool, as well as advanced designs that adapt to screen size, aspect ratio, and orientation changes. He reviews the version control and storyboard features, as well as the basics of schemes and behaviors. Plus, learn how to compile and debug apps, test apps in the iOS Simulator, and send your app to Apple for distribution in the App Store.
- What is Xcode?
- Installing Xcode 8
- Creating your first Xcode project
- Editing code
- Creating snippets
- Adding Git version control
- Making interface connections to the code
- Using Interface Builder
- Creating storyboards
- Pinning objects
- Compiling code with the LLVM compiler
- Working with schemes and behaviors
- Sharing resources in a workspace
- Catching common errors with Analyze and Fix-It
- Using the iOS Simulator
- Preparing an app to be published
Skill Level Beginner
Duration
Views
-
Introduction
-
Welcome47s
-
-
1. Getting Started
-
What is Xcode?1m 57s
-
Install Xcode 840s
-
Explore the user interface4m 59s
-
Use tabs2m 2s
-
Open files quickly1m 9s
-
View the Xcode documentation2m 14s
-
Use the Quick Help inspector1m 52s
-
Import assets4m 57s
-
-
2. Edit Code
-
Create snippets4m 6s
-
Use the Symbol Navigator2m 48s
-
Prototype in a playground3m 44s
-
3. Version Control
-
Commit changes2m 34s
-
4. Interface Builder Basics
-
Explore Interface Builder5m 58s
-
Use the Identity Inspector5m 33s
-
Use the Attributes Inspector3m 55s
-
Use the Size Inspector2m 45s
-
-
5. Storyboards
-
Understanding pinning7m 16s
-
Modify pins3m 26s
-
6. Compiling
-
Work with schemes3m 1s
-
Use behaviors1m 51s
-
7. Debugging
-
Use the debugger3m 42s
-
Work with breakpoints3m 15s
-
-
8. Workspaces
-
Create a workspace4m 18s
-
-
9. Static Analysis Tools
-
Correct errors with Fix-it1m 54s
-
Use the Analyze tool1m 48s
-
-
10. The iOS Simulator
-
11. Publishing Apps
-
Send an app to Apple2m 40s
-
Conclusion
-
Next steps1m
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Create snippets