Learn how to add a selection methods to the menu. Show the selection using the assessmentStatus function of playground support.
- [Instructor] A menu table like this is made…for choosing an item.…You can use the didSelect method of the table view…to select an item.…But, there's no easy way to send feedback to the user…about their choice.…You could make an alert if you wanted to do a lot of coding,…but that's a little bit more work than I want.…Playground Support has another solution:…The AssessmentStatus Enumeration.…There are two assessment status types, pass and fail.…Pass will give you a message.…Fail will also give you a message and a hint…to solve the problem.…They are meant for evaluation in education settings,…but pass works well for a short alert while prototyping.…
In our code, get ride of the live view…and clean up your code just a little bit and I'm going to…remove some of these.…And then after the self or row at index path,…I'm going to type "didsel"…and you'll see the table view…didSelectRowAt indexPath method and I'm going to go…and hit that.…And you'll see, of course, there's a little dot there.…
That, again, is for overrides so go ahead and fix…
- 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
1. Introducing Playgrounds
2. Xcode Playgrounds
3. iPad Playgrounds
4. Markup and Playgrounds
5. Playground Books
- 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.