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.
UIKit and view controller lifecycle - iOS Tutorial
From the course: Learning iOS Animations with UIKit
UIKit and view controller lifecycle
- [Instructor] Now that we've got our starter project sorted out, let's talk about what we can actually do with a view's properties as far as animating goes, and where these animations fit best in the view controller lifecycle. Since position and movement animations are probably the most common, let's talk about those first. Now, the easiest way to reposition a view is by adjusting its center X or Y values or simply setting the center to a new CG point. We'll be using the center property for most of our repositioning needs throughout the course. We can also move views by accessing the origin X and Y values through the frame property if that's what we need. Just remember that the X and Y origin coordinates are calculated from the top left of the view in IOS. If we need to move the view's actual content around, we have the option of animating the view's bounds. Now, what if we wanted to change the size of a view with an animation? Well, we could use the frame property again to access…
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.