PhotoCapture Application In iPhone

PhotoCapture Application in iPhone

In this application we will see how to capture photo of the view in the application by using button pressed and save the photo in the Photo gallery. So let see how it will worked.

Step 1: Open the Xcode, Create a new project using View Base application. Give the application “PhotoCapture”.

Step 2: Xcode automatically creates the directory structure and adds essential frameworks to it. You can explore the
directory structure to check out the content of the directory.

Step 3: Expand classes and notice Interface Builder created the RootViewController class for you. Expand Resources and
notice the template generated a separate nib, PhotoCaptureViewController.xib for the PhotoCaptureViewController class.

Step 4: Open the PhotoCaptureViewController.h file and make the following changes:




Step 5: Double click the PhotoCaptureViewController.xib file and open it to the Interface Builder. First drag the label from the library andplace it to the view window. Select the label from the view and bring up Attribute Inspector and change the Text into “Welcome To iPhone” . Now save the .xib file, close it and go back to the Xcode.

Step 6: In the PhotoCaptureViewController.m file make the following changes:




Step 7: Now compile and run the application in the Simulator and check Save image in the Photo Gallery.

You can Download SourceCode from here PhotoCapture.