Add a background image to your application's buttons, and scale images on the interface.
- [Narrator] As much as you can, size your images…to the correct size before you add them…to the project asset.…However, there will be times when this doesn't work.…You'll have to size the images.…Sizing images in watchOS presents some…interesting challenges.…Let's look at one of those cases.…Go back to interface storyboard.…The pizza image on the interface…fits the entire width of the Apple Watch.…Run the application.…
You'll see much of the controls…scroll off the watch.…The solution is to scale down the image.…This is one of the few times I use…the third setting in sizing.…Go ahead and do it.…Back on the storyboard, select the image…and go down to size.…For height in size, select fixed…and change the value to 75 and hit return.…
The image gets squashed.…Set the mode on the top here, under image,…to aspect fit…which preserves the aspect ratio of the image…by scaling it to fit the image view.…This shrinks the image.…I prefer a bigger image.…Switch it to aspect fill which zooms in…to keep the aspect ratio but will cut off…
- 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.