Last month my colleague Kilian and I were pleased to attend the Swift Alps Conference, an experimental conference about Swift taking place in the Swiss Alps. This conference had a different format from what one can expect from a typical software development conference. In this case the format was more focused in experimenting and collaborating with other attendees with the goal of learning something new.
The venue was located in the Swiss canton of Valais, in Crans-Montana, which is a ski resort in the heart of the Swiss Alps.
The combination of this specific location with the amount of snow, made the conference even more magical, if possible.
My colleague Kilian and I were in charge of being mentors and creating a workshop about animations in Swift. We decided to talk about how animations can improve the overall user experience of an app together with all the different benefits that they can bring to the user. In addition we talked about the 12 basic principles of animations in design.
Slides from the workshop
The main part of being a mentor in the conference was running different workshops during the day where attendees could join and build/create/learn something new related to the topic of the workshop. We proposed to the attendees to build something with animations using Swift. The 3 proposals we gave were, 1.- Snow background effect, 2.- Cowbell notification badge and 3.- Cheese view transition. Here we’ll just cover the first proposal of how to implement a snow background effect using Core Animation in Swift.
Snow background effect
Using CAEmitterLayer from Core Animation we accomplished the following result.
In order to accomplish the effect, we need to create an instance of CAEmitterLayer, then append to that instance of CAEmitterLayer the different CAEmitterCell that represent the snow flakes.
We want to thank the Swift Alps conference organizers for creating and putting together such an awesome event! Indeed, by looking at the reactions of the people, we can say it was a great success. Also thanks to the other mentors for sharing all their knowledge with us, and spending time together. Finally a big thank you to the rest of the participants for bringing such a cool vibe to the conference, making it a really special event.