Understand a modal controller and its uses, and add a modal controller both programmatically and by using segues.
- [Instructor] There's one more way to navigate…we haven't looked at yet, modals.…When coding a modal it looks a lot…like a single page, page controller.…On the storyboard and its actions…it works a lot like a push segue.…Use these for setting alerts and other interfaces…where you are grabbing the user's attention…away from the flow of the app.…I'll use a new interface for this.…Go over to the interface storyboard, pull up attributes,…and pull out another interface controller.…
Change it's identifier and title to Modal.…Drag a button out.…We're going to make that another bottom vertical alignment,…and change that to dismiss, press Return.…Just like before, we'll do a Command + N…to get a WatchKit class, hit next,…make this one called ModalInterfaceController,…it again will be a WKInterfaceController, hit next.…
Again, watch your group, you want it in the extension.…Hit create, go back to the interface storyboard,…click on the modal, and change its class…to ModalInterfaceController.…On interfaces two and three,…I'm going to add a button, the top.…
- 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
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.