Learn how to create a prototype application in an Xcode playground.
- [Instructor] You've activated live view.…We're going to build a prototype menu board…for the Huli Pizza Company…by adding views to the live view's view controller.…We'll add a UI text view to make a menu board.…Close the Assistant Editor for now.…Add a new property to our class, textView.…Var textView = UITextView.…Under that, add a string…that we'll use to keep the menu text.…
I added some initial text to the screen.…Var menuText = "Huli Pizza Company,"…and I'll do a \n for a new line.…Above viewDidLoad, add a new function, addViews.…This will add views to our current view.…In Playgrounds, you don't have an interface builder.…
You have to code each of your controls.…I'll show you an example of this with the textView object.…We'll make the textView…the full size of the view controller's frame,…so add to the new function…textView - UITextView,…parenthesis, and we'll use frame,…and the frame will be view.frame.…We'll set the font to something fun.…
I like this to have the look…of a chalkboard in a pizza restaurant,…
Author
Released
7/21/2017- 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
Duration
Views
Related Courses
-
iOS App Development: Notifications
with Steven Lipton1h 10m Intermediate
-
Introduction
-
Welcome1m 11s
-
-
1. Introducing Playgrounds
-
Run an iPad Playground3m 30s
-
Move between playgrounds4m 13s
-
2. Xcode Playgrounds
-
Start with Xcode playgrounds4m 22s
-
Code a prototype8m 45s
-
Debug with quick looks3m 20s
-
Layout views4m 19s
-
Add resources3m 27s
-
Autolayout in playgrounds2m 22s
-
Add autolayout4m 33s
-
Use source folders6m 28s
-
Use pages4m 50s
-
-
3. iPad Playgrounds
-
Use assessment status5m 21s
-
Add resources3m 27s
-
View and use sources6m 37s
-
4. Markup and Playgrounds
-
Formatting markup5m 45s
-
Add code markup6m 1s
-
Interactive code6m 36s
-
Change code completion7m 56s
-
-
5. Playground Books
-
Explore book structure2m 16s
-
Build book structure6m 15s
-
Add book content7m 31s
-
Debug books5m 23s
-
Set book manifests3m 46s
-
Create cut scenes8m 49s
-
Always-on live view1m 59s
-
-
Conclusion
-
Next steps1m 26s
-
Swift bug and playgrounds6m 43s
-
- 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: Code a prototype