- [Instructor] Alright, let's jump right…into the solution here.…I'm inside the addDynamicInfoLabel function…right at the bottom…and I'm going to add in a simple animation…with no spring motion or bells and whistles.…I'm going to say UIView.animate.…This is going to last for one second…and inside here, I'm just going to change…the xAnchor's constant value…to half the newsletter view's width.…So, I'm going to say xAnchor.constant equals…self.newsletterView.frame.size.width…divided by two.…
Now, if you tried to use the screen bounce property…from our animation manager…or even the newsletter center X value here,…I really commend you for the great idea, but, unfortunately,…you won't get the desired placement…since the info label is a sub view of the newsletter view…and the newsletter view is a sub view…of the main super view, the center X values…for both won't add up to the same position.…Now, to round things off right here…after our xAnchor, we're going to say…self.newsletterInfoLabel.alpha…is going to be set to one.…
- How animations fit into the view controller lifecycle
- Writing simple view animations
- Making use of animation options
- Adding spring animations
- Working with keyframes
- Using calculation modes
- Animating constraint values
Skill Level Intermediate
1. Getting Started
Starter project review1m 45s
2. Animation Basics
3. Springs and Transitions
4. Working with Keyframes
5. Auto Layout and Beyond
Next steps1m 1s
- 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.