Heading into the code, add code to the actions to make a working app.
- [Instructor] The project is now ready to code.…If you've worked with IOS, you probably would think…to do something like HelloLabel.text equals…Quote Hello Pizza Unquote…However, most properties, on a WK interface label…unlike a UI button in UI kit, are read only.…We very rarely set properties in WatchKit.…Often, we use a setter method to set the value.…For labels to set text, that is the set text method.…Let's start by clearing out our X Code a little bit.…
So we can give ourselves an example space.…I'm going to go ahead and close the assistant editor.…And I'm going to open up the navigator,…go over to interface controller.swift.…So we have our code.…And let's try this with the set text method.…Head over to didPressPizza…and press return so you have some space there…And we'll type in our label, helloLabel.set text.…And there's our text string and I'm going to put…in the string hello.…
I'm going to add an emoji for this pizza.…So I'm going to put a space here.…And I'm going to have you hit control command space.…
- 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
iOS App Development: Test-Driven Developmentwith Harrison Ferrone2h 14m 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.