Learn how to move contexts from segues using contextForSegue.
- [Instructor] Sending a context through a segue…requires a few different steps to set up and code.…To demonstrate, I'll change the title on the two controller.…Shut things down here.…I'll be using the same dictionary,…so we can use the same code in awake withContext…that we used in the three controller.…So I'm going to take it, copy it,…and then awake withContext, paste it.…
Head back over to the interface.storyboard.…Select the segue between one and two,…and I'm going to do a fresh segue here…and assume that we're just doing this from scratch,…and so what you would be doing…is you would be doing control-drag from the button two…to the two interface controller,…release, we're doing the push,…pull up the attributes inspector,…select the segue, and type toTwo…just like prepare for segue in iOS,…you need an identifier to pass contexts.…
So, in the attributes inspector,…we've added toTwo and now we can go ahead…and close the attributes inspector after we hit return…and notice that we don't have any spaces…or anything else there that would mess up that identifier…
- Principles of watchOS development
- Adding buttons and labels to your app
- Connecting objects to code
- Testing a watchOS app
- Laying out WatchKit UI objects
- Adding navigation
- Using Interface Library elements such as inputs, pickers, and media players
- Creating tables
- Working with table data
Skill Level Intermediate
Google Firebase for iOS: First Lookwith Joe Marini1h 4m Intermediate
1. A Look at the Apple Watch App
2. Building Your First Apple Watch App
3. Working with UI in watchOS
5. Interface Library
6. Tables and Scrolling
Next steps1m 57s
- 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.