Skip to content

Making MemeMe: Instagram Did It, So Why Can’t I?

Welcome to “Making MemeMe” where I chronicle my adventures and discoveries in creating the second portfolio app in Udacity’s iOS Developer Nanodegree.

Turns out, comparing your n00b iOS skills to those of the developers of an extremely popular social media app is probably a mistake. Having these types of thoughts generally sends a person down a rabbit hole they had no business exploring in the first place.

See, I could have progressed further with the MemeMe app. I could have just focused on the new skills I actually needed to learn in order to pass the project. But I haaaaad to go and make things difficult.

I’ll elaborate.

The MemeMe project specification calls for two buttons in a toolbar: one to select images from the Photo Library and another to capture an image from a camera. I did that. But then I got to thinking, “Gee, the camera in the Instagram app is pretty nifty. There’s just one button to launch the camera, and you can access the Photo Library from the camera view. I want that in my app!”

I imagine that Artemis’ (the cat’s) demeanor in this photo is akin to the response of any knowledgable iOS Developer reading my antics.

After a bit of Googling, it seemed that I needed to create a custom camera using AVFoundation. The examples in Lesson 6 of UIKit Fundamentals uses UIImagePickerController to present a default user interface to take photos and pick images from the Photo Library. It works wonderfully. In retrospect, this is probably where I should have stopped my research and returned to the completing the project as specified like a normal person. But I didn’t.

I found a fantastic tutorial on taking control of the camera using Swift. I got a basic slider going to adjust focus, and though I wouldn’t need that for MemeMe, I felt incredibly confident in my ability to create and customize my own camera.

I knew nothing, Jon Snow.

My next plan of attack was to read through Apple’s AV Foundation Programming Guide. @_@ Boy, oh boy is there a lot that goes into the camera! Focus, resolution, ISO, exposure, white balance, flash…essentially a whole bunch of settings that remind me why I love the “auto” feature on my digital camera. It seemed that if I continued down this path I probably wouldn’t finish MemeMe until next year. And so, I reluctantly turned away from my custom camera dream.

Basically, using AVFoundation seems like a great option for experienced photographers who want more control over the camera. I, however, can’t be bothered to adjust settings on an actual camera, so spending more time creating a custom camera seemed like a poor use of time.

While my detour didn’t end up how I wanted it to, I do now have an increased appreciation for the complexity of classes like UIImagePickerController, and the work Apple’s done to make using them so simple. Plus, I had fun learning how to make a custom camera and playing with the focus.

It’s my custom iPad camera…that doesn’t focus very well because manual focus is a b*tch.

I still haven’t given up hope of implementing an Instagram-esque camera view. On that front, the cameraOverlayView property back in the UIImagePickerController class looks pretty interesting, and is something I missed before. But for now, I think I’ll return to the task at hand and work on MemeMe as it’s meant to be built.

Published inios

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *