Learn how to add markup to show code examples. Add markup for partial completion of a line of code.
- You've done a lot of formatting.…If you take a look at the rendered markup…on the Pizza, however, there's more that we can do.…I may not want students tutorial or my clients…proposal changing or seeing the code I've written.…No one needs to see the import of libraries, for example.…On the other hand, I might want to…encourage them to change certain parts…of my code to see what happens.…There's a markup for both situations.…To hide code, you use two special tags…to start and end the hidden code.…These tags work best at the beginning or end of your code,…with one exception I'll get to shortly.…
In our code, you can hide the two import statements.…Go back to Raw Markup.…In the Pizza Playground, cut and paste the two…import statements to the top of the code.…Add these two tags around them.…You'll add a hidden code tag…and an end hidden code tag.…(typing)…Try rendering them in Xcode.…
They still appear.…These tags only work on the iPad.…Go over to your iPad,…and load the file we've been working on.…You might see the red download arrow.…
- Comparing iPad and Xcode playgrounds
- Creating and testing Swift classes and code in iPad and Xcode playgrounds
- Prototyping code
- Debugging and testing with Quick Look live views
- Using markup to interactively document code and create educational lessons
- Compiling code into playground books
Skill Level Intermediate
iOS App Development: Notificationswith Steven Lipton1h 10m Intermediate
1. Introducing Playgrounds
2. Xcode Playgrounds
3. iPad Playgrounds
4. Markup and Playgrounds
5. Playground Books
Next steps1m 26s
- 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.Cancel
Take 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.