How to create a Stop Motion animation camera using AVFoundation in iOS

Ashika Kasiviswanathan
9 min readFeb 21, 2018

Building a camera is one of the common tasks in developing a social media iOS app. In this article, we will build an app with a camera to create the Stop motion animation effect. Stop motion effect is achieved by playing a series of images as a fast sequence to create an illusion of movement.

Stop-Motion created using AVFoundation — End of the tutorial you should have an app doing this :)

First of all, creating an iOS app with camera functionality can be done in two different ways. It is either using an UIImagePickerController or through AVFoundation framework.

What is AVFoundation?

AVFoundation is an iOS framework used for building power audiovisual functionality into your app. Using this framework, you can manipulate the capturing, processing, editing, importing and exporting of the audio and video assets.

UIImagePickerController vs AVFoundation:

With UIImagePickerController, we can perform all the basic tasks such as capturing, toggling flash, switching camera, editing focus and exposures. Also, it lets you access the photo library to store and share images. It is easier to implement compared to AVFoundation.

However, AVFoundation provides full control over camera settings and media manipulation. It lets you do all basic tasks as an…

--

--

Ashika Kasiviswanathan

Software developer — Web and Mobile — ReactJS & Swift — In Love with building apps.