Beginning iOS Animations 路 Challenge: Create a Fade Animation | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/9051-beginning-ios-animations/lessons/14

Shouldn鈥檛 the challenge solution you show include an addition to changeFlight() to handle snowView when not animated?

if animated {
  fade(toImage: UIImage(named: data.weatherImageName)!, showEffects: data.showWeatherEffects)
} else {
  bgImageView.image = UIImage(named: data.weatherImageName)
  // Show no-show snow
  snowView.alpha = data.showWeatherEffects ? 1.0 : 0.0
}

Do you guys have any more resources on how to learn more about what鈥檚 going on in the SnowView subclass of UIView? It鈥檚 fascinating and I鈥檇 love to learn more about the intricacies of the layer property of UIView, CAEmitterLayer, & CAEmitterCell.

Hi! The iOS Animations by Tutorials book does have several chapters on layer animations. It goes into CAReplicators a bit, but has no real coverage of CAEmitter in particular.

I鈥檓 really sorry to say most of our video and written tutorial material on CALayers hasn鈥檛 been updated recently, but here鈥檚 the options I know of at the moment:

This tutorial has a brief introduction to a lot of types of layers: https://www.raywenderlich.com/402-calayer-tutorial-for-ios-getting-started#toc-anchor-017

If you鈥檙e up for a slightly more challenging time converting projects from Swift 3, you can check out the follow up to this course. The layer animations start in episode 5: https://www.raywenderlich.com/4226-intermediate-ios-animations/lessons/5

Or Caroline Begbie鈥檚 Drawing in iOS course, which also discusses layers, and is at least in Swift 4/iOS 11:
https://www.raywenderlich.com/4659-drawing-in-ios-with-core-animation-and-core-graphics

If I think of anything else, I鈥檒l send it your way! :art: