Learn about what horizontal sizing and vertical sizing is in the Interface Builder and the storyboard. Learn what the two types of sizing modes—fit to content and fit to container—mean, and learn when to use them. Also learn about some more ways to control sizing and spacing.
- [Narrator] In watchOS, sizing is constrained…to only a few choices,…none of them as complex as the constraints for auto-layout.…You size the objects by their relation to what's inside them…or what is outside them.…In this video, I'll show you how to size buttons and labels…in Interface Builder for watchOS.…In the current project select the Entree label.…The border of the subject appears…as a line hugging the content.…If you look over to the attributes inspector,…under Size, you'll see the width and height are both…to Size To Fit Content.…
This is one of three ways to size an object…in a watchOS storyboard.…Size To Fit Content, Relative to Container, and Fixed.…Labels by default are sized to fit content…both in width and height,…expanding or contracting to fit the text in size.…Select Pizza.…Buttons by default are Relative to Container sizing…for width and Size To Fit Content for height.…This sizing stretches the boundaries…of the view horizontally.…
We rarely use the Relative to Container for a good reason.…It shoves everything out of the way.…
- 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.