2

This is more of a theoretical question. I'm fairly new to iOS programming so haven't nailed fully the terms to use in scenarios like this. I've been asked to create an application where I need to fire an event to capture an image programmatically. The application will be in the foreground, and will have the requisite permissions to use the camera. I've been unlucky with my searches so far - likely because I haven't termed them correctly.

My question is this; Given an application with a camera view, set up to capture images - is it possible for me to fire an event within said app to capture the image, without a button necessarily being pressed? If so, how would I go about finding documentation to guide me through?

In an ideal world, I'm hoping for something as simple as cameraObject.capture() or something of that ilk - but an ideal world is a rarity!

Thanks in advance!

Sean Leach
  • 49
  • 6
  • 1
    A simple search with "iOS take image programmatically" would do. Translating the code to Swift should also be not too difficult. http://stackoverflow.com/questions/9694859/ios-taking-photo-programmatically http://stackoverflow.com/questions/22426293/how-to-force-ios-camera-to-take-a-picture-programmatically-using-avfoundation http://stackoverflow.com/questions/14185126/take-a-picture-in-ios-without-uiimagepicker-and-without-preview-it – Sebastian Wramba Oct 20 '14 at 13:22
  • 1
    Thanks - That's exactly what I was looking for. I must've had a braindead period this morning as I've completely skipped those questions! Feel free to post that as an answer so I can mark it as answered - or perhaps I should just delete it as it is a bit of a poor Q! – Sean Leach Oct 20 '14 at 13:25
  • upvoted the poor question just because you admitted it was poor, will help with your numerical reputation some. And welcome to stackoverrflow! – Paul Cezanne Oct 20 '14 at 13:26

0 Answers0