Skip to content

Creating a Custom Camera View

Charlie Hieger edited this page Nov 21, 2015 · 50 revisions

Accessing the built in Image Picker Controller is an easy and quick way to get image and video capture into your app. However, when you need style and functionality that goes beyond the stock Image Picker Controller you will need to create a Custom Camera View.

Custom Camera View Demo

Step 1: Set Up Views In Storyboard

Set Up Views In Storyboard gif|200 Outline Document gif|60

Add the following view elements to the ViewController in Storyboard:

  • UIView This will serve as the "view finder" of your camera.
  • UIImageView This will hold the captured still image after you take a picture.
  • UIButton This button will "take a picture".

Step 2: Create Outlets and Actions

Create Outlets for the UIView and UIImageView.

  • Name the UIView, viewFinder.
  • Name the UIImageView, captureImageView.

Create an Action for the UIButton.

  • Name the method, didTakePhoto.
Clone this wiki locally