1 / 8

iOS Photo API

iOS Photo API. North Atlanta iOS Developers Meetup 05/10/2012. Overview. Hopefully this presentation might inspire one to develop the next InstaGram . If you do, and your app becomes a success – please remember all of us at the Meetup Group. 

kevork
Download Presentation

iOS Photo API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. iOS Photo API North Atlanta iOS Developers Meetup 05/10/2012

  2. Overview Hopefully this presentation might inspire one to develop the next InstaGram. If you do, and your app becomes a success – please remember all of us at the Meetup Group.  The good news is that taking Photos from the Camera is easy.

  3. UIImagePickerController UIImagePickerController is the iOS class that is responsible for launching the Camera and Photo picker dialogs. UIImagePickerControllerDelegate is a delegate class that is used to indicate that a Photo or Image has been chosen or not chosen.

  4. PhotoGram app At this point I will walk you through the PhotoGram app. For more details on the UIImagePickerController class and Delegate, the Apple documentionis useful.

  5. Summary of PhotoGram app 1) In your ViewController’s header, you should declare that it implements the UIImagePickerControllerDelegate and UINavigationControllerDelegate Question: Normally one only declares 1 delegate. Why is UINavigationControllerDelegate required as well?

  6. Summary of PhotoGram app 2) In response to a button click (refer to takePhotoFromCamera method) a) Create UIImagePickerController object b) Optionally set it to allow Editing c) Set Source Type (UIImagePickerControllerSourceTypeCamera) d) Set Delegate e) Present UIImagePicker modally

  7. Summary of PhotoGram app 3) Implement UIImagePickerController delegate methods. Inside the didFinishPickingMediaWithInfo method get the UIImage, do whatever processing required for your app, and dismiss controller

  8. Summary of PhotoGram app The processing in the PhotoGram app is to save the Image to a file in the Documents directory named with the current system time (This should be unique) – and then displays the image on the Image View Question: Why should the image be persisted (stored to file) – if all we are going to is display it?

More Related