From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Make an animated settings drawer

Make an animated settings drawer

From the course: iOS Development Tips

Make an animated settings drawer

- [Instructor] You've probably seen menus that pop out of the side of an app. But do you know how to make one? With the knowledge of some simple code, you too can add these to your application using Auto Layout. If you look at the example file, I've set up a storyboard for you. There's a few buttons and a subview with more buttons. Open up the constraints, and you'll see that I have a subview with a bottom and trailing constraint, the width and the height. The trailing constraint is set to be flush with the superview, so that when closed it is closed completely. Now if you open up the Assistant Editor, and give yourself a little space here, you'll see that I have an outlet already set for a trailing constraint. And I'm going to drag and make that outlet this trailing constraint. Now I'm going to go close all this up, and head over to the View Controller, and look at my code. So I've got that trailing constraint, I've got a drawer outlet for the UIView. And I've got a bunch of methods…

Contents