Open nettybrook opened 8 years ago
I continue to be amazed by how your skills are progressing! ⭐⭐⭐
Awesome implementation of the required features plus the addition of the edge pans and the compose view! I can tell that you are beginning to become much more comfortable with the concepts and the Swift language 👍
UIView.animateWithDuration(_:)
with the completion block.
Any code in the completion block section will only be run after the animation has finished. This might be helpful if you wanted to wait until the message had completed its animation off screen before showing the reschedule view etc.UIView.animateWithDuration(0.2, animations: {
// This is where you will animate stuff
// messageView.center = offScreenToTheLeft
}) { (Bool) in
// This code will run when animation is finished
// Show the reschedule screen
}
If you want to run another animation, like fading in the reschedule screen, after the message animation is complete, you can nest animateWithDuration(_:)
methods. (Try not to get too carried away with extreme nesting of many methods as it gets a little messy)
UIView.animateWithDuration(0.2, animations: {
// This is where you will animate stuff
// messageView.center = offScreenToTheLeft
}) { (Bool) in
UIView.animateWithDuration(0.2, animations: {
// This animation will run after the first animation
// rescheduleImageView.alpha = 1
})
}
Thank you ! and thanks for the additional tips :) I am very happy today. Feel like I can conquer the world. hehehe.
On Jun 07, 2016, at 10:55 AM, Charlie Hieger notifications@github.com wrote:
I continue to be amazed by how your skills are progressing! ⭐⭐⭐ Awesome implementation of the required features plus the addition of the edge pans and the compose view! I can tell that you are beginning to become much more comfortable with the concepts and the Swift language 👍 One detail you may want to consider regarding animation: Anytime you want to have something happen after the animation has completed, you can use the UIView.animateWithDuration(:) with the completion block. Any code in the completion block section will only be run after the animation has finished. This might be helpful if you wanted to wait until the message had completed its animation off screen before showing the reschedule view etc. UIView.animateWithDuration(0.2, animations: { // This is where you will animate stuff // messageView.center = offScreenToTheLeft }) { (Bool) in // This code will run when animation is finished // Show the reschedule screen } If you want to run another animation, like fading in the reschedule screen, after the message animation is complete, you can nest animateWithDuration(:) methods. (Try not to get too carried away with extreme nesting of many methods as it gets a little messy) UIView.animateWithDuration(0.2, animations: { // This is where you will animate stuff // messageView.center = offScreenToTheLeft }) { (Bool) in UIView.animateWithDuration(0.2, animations: { // This animation will run after the first animation // rescheduleImageView.alpha = 1 }) } — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
My app is complete /cc @codepathreview includes mandatory stories and optional: Edge pan, compose message