From the course: Learning iOS Animations with UIKit
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
View transitions, part 1 - iOS Tutorial
From the course: Learning iOS Animations with UIKit
View transitions, part 1
- [Instructor] The simplest view transition to implement is showing or hiding a view so let's start with that one. When the view appears, we want the continue button to transition from is hidden to is visible with a nice effect so let's go into viewWillAppear and we'll say continueButton.isHidden = true. Now if you go up to our outlets, you'll see that our continueButton is of type CustomButton which you can find in the view subfolder of our project. All this is is a simple button class that I set up to make working with user interactions easier. All it does right now is called setup method on awakeFromNib which for now just rounds its corners. It'll be up to us to animate its target actions later on. So let's go back into our view controller code and down at the bottom of our script, let's make a little bit more room and start a new function. Let's say func showContinueButton. Now we can add in the view transition. Now we use the transition method in the UIView class just like…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.