O'Reilly logo

iOS Programming Cookbook by Hossam Ghareeb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Capturing photos and videos

Most of the apps that we develop require a way to pick or capture a photo or video to use in the app. All social networking apps have the feature of sharing images and they ask you to upload images or videos from Camera or Photos. Similarly for other types of apps such as, chatting, and image editing apps. This kind of feature is very simple to implement in iOS and, in this section, we will see how to provide options for users to pick images.

How to do it...

To provide options for users to pick an image, perform the following steps:

  1. Create a new Xcode project with the Single View Application template and name it ImageVideoPicker.
  2. Add a button at the center of the screen to pick a photo or video. Change the title of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required