Learn to code in the extension for setting images with the setImage function. Use the extension's assets folder and auto-complete to make specifying images simple.
- [Instructor] You now know how to add images to Xcode.…Suppose you wanted to show a food image…after pressing one of the three buttons…we have on the watch.…Then you need to code image changes,…close up the navigation,…then attributed and specters,…to give yourself some more room.…Open up the assistant editor,…scroll in zoom the interface…so you can see everything clearly.…In your code,…add some space so you can add the outlets…and actions to your code,…select the top photo,…and control drag.…
Make an outlet named image,…now control drag from the pizza button,…make an action and name it did press pizza…and connect it…and we'll do the same thing with the pasta button.…Control drag.…And, finally, the cake button.…
Control drag.…And make this an action, did press cake.…Go ahead and close the assistant editor.…Open the navigator…and head over to interface controller dot swift.…To simplify things, I'm going to delete the three…lifecycle methods here…just to clean up our code.…With our three methods done,…we're going to now add some code to them.…
- 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.