Tutorial: Disable the iPhone 4’s Front Camera

August 24, 2011

I’ve been negligent in posting new articles this year, but despite appearances this blog isn’t quite dead yet. I’ll begin regular postings again soon, but in the meantime here’s a link to an article I guest authored over at iCodeBlog:

One option is to replace the standard camera controls with a custom interface, but that’s a whole lot of work if you just want to prevent the user from taking a photo with the front camera. Fortunately there’s another option: put a transparent button over the “switch camera” button, which will intercept touch events and show an alert dialog. It sounds simple, but as you’ll see there are a few tricks to actually getting this to work.

Check out the rest here!

Marc Charbonneau is a mobile software engineer in Portland, OR. Want to reply to this article? Get in touch on Twitter @mbcharbonneau.