December 20, 2018 11:48

I learn best by doing: jumping right into code, trying out new languages and libraries on my own personal projects.

André Schneider published an excellent project on GitHub a few years ago which demonstrates a lot of Facebook pop's animation capabilities as well as some native iOS easing and other effects.

The only "problem" is that it's written in Objective-C, which I never really got into. I haven't found any great pop demos or tutorials in Swift, but thankfully it's not terribly difficult to convert Objective-C into Swift.

I was able to incorporate some animation effects into my guess the car game but I always wanted to sit down and port the entire demo project over.

Well that is finally done and it can be found here:

https://github.com/andrewtweber/popping-swift

Besides the grunt work of converting the code syntax, I actually learned quite a bit about programmatic constraints (I had always used Storyboards previously), attributed strings, and gesture recognizers. I’m more familiar with Objective-C now too of course.

And since this is a public open-source project that I'm publishing, it also forced me to stick to some good habits such as using guard everywhere and MARK: - comments.

iOS, Swift