Learn how to constrain UI elements to control what they look like when the screen size changes.
- [Instructor] In this video,…I want to show you how to use constraints.…Constraints allow you to dictate…how your user interface will look…as it gets resized from different sized screens…and different sized windows.…In Visual Studio for Windows,…we would call this docking or docking options.…Well, like everything else,…it's just a little bit different in Xcode.…So what I'm going to do I'm going to dock this button.…And there I go using the normal Windows terms again…because that's what I'm used to.…
I'm going to constrain this button…so that it's always this exact same distance…from the edges of the bottom of the application window.…To do this, I need to only pick the button…and then come down here and find Add New Constraints.…I'll click it and from here I can specify…a myriad of different constraints.…But the one that I'm after is this top one,…spacing to nearest neighbor.…
And as I said,…I want this to always be the same distance from the edge,…20 pixels from the bottom right-hand corner of the screen.…So I'm going to click the little spring here…
AuthorBruce Van Horn
- Exploring C# on a Mac
- Creating a reusable code library
- Classes and properties
- Loops, arrays, and lists
- Creating a console app
- Creating a command-line app
- Creating a Mac desktop app
- Creating a UI with view controllers and actions
Skill Level Beginner
1. C# on the Mac?
2. Getting Started with C#
3. Deeper into C#
4. Creating a Mac App
Next steps3m 14s
- 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.