Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Take photo or select from library

Tags:

ios

iphone

ios5

I want to get an image from the user as shown here.

enter image description here

This looks like a lot of work:

  • see if device has camera
  • create action sheet with appropriate options
  • translate "Take Photo" and "Choose from Library" into every language my app supports
  • look for response
  • bring up image picker with selected image picking method
  • get response, extract image from a dictionary
  • dismiss picker

So the question is: first, am I missing any steps? Second, I have seen this done hundreds of times before in other apps, is there really no faster way to do this? Most importantly, I am not looking forward to adding strings to my project if there is a standard naming and translation already in the SDK.

like image 789
William Entriken Avatar asked Dec 06 '22 13:12

William Entriken


1 Answers

I created a library to take a photo or select from library as a response to the question above and share for you at: https://github.com/fulldecent/FDTake

This works great so far for photos. [UPDATE] Also does videos now.

Homepage at: https://www.cocoacontrols.com/controls/fdtake

like image 188
William Entriken Avatar answered Dec 28 '22 12:12

William Entriken