Learn how to align objects on the watch both vertically and horizontally, and learn about how stacking behavior and alignment work together.
- [Narrator] Object alignment for watchOS…is very different than iOS.…Xcode for watchOS avoids all the complications…of auto-layout's constraints…by giving you only a few options,…much like the stack view in iOS.…There are only three ways to align horizontally,…and three ways to align vertically.…Horizontally, you can align any object to the left,…the center, or the right.…Vertically, you can align zones…for the top, the center, and the bottom.…You set these using the Alignment Attributes…on the storyboard.…
There are no properties to control them.…Let's lay out the current interface…to make more sense than it does now.…Select Choose Dinner.…You'll see in the Attribute Inspector,…the alignment is Horizontal Left,…and Vertical Top.…Click on the drop-down for horizontal alignment.…The storyboard shows the three options of…Left, Center, and Right.…Change to Center.…The label centers.…Select Strawberry.…Set horizontal alignment for Strawberry to Right.…
It moved to the right.…While you'll notice there's an option to…storyboard attributes for Left, Center, and Right text…
- 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.