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.

Chapter solution

Chapter solution - iOS Tutorial

From the course: Learning iOS Animations with UIKit

Start my 1-month free trial

Chapter solution

(upbeat music) - [Instructor] Alright, let's go back into X-Code and select our springs and transitions view controller and scroll down to underneath add text fill with transition. And add in a new function. We're going to call this remove text field with transition. It's going to take in no parameters and here we're just going to call UI View transition. We want to select the second option, which creates a transition animation for a container view. And for our container view again, we're going to use the text field container. We want this to last one second. For, the options we want to have. Transition Cross Dissolve because it's going to match how we animated the view in and tap into the animations closure and clear that out and set the completion closure to nil. Now this should seem pretty familiar to you right now. The new part is that we're going to remove the phone text field by saying self dot phone text field dot remove from super view. Again this is going to remove our phone…

Contents