Advanced Development of Custom Camera iPhone Applications
iPhone applications for taking photos look really great. Though what about using camera in native applications? What about creating a full-screen persistent "live" camera view? Intrigued to know how the application has been developed for you? Now in this press release Enterra Inc. reveals its secrets! Get the idea of how it works. Have a look on the application from the inside.
Tampa, Florida (PRWEB) March 2, 2009 -- Marvelous iPhone application
Enterra developed a new iUniqable application. iUniqable allows you to send photos with notes from your iPhone to Facebook or Flickr. It is developed in such a way that it doesn't take you long to take a picture. You can upload a photo right after you have taken it! Moreover iUniqable has intuitively obvious navigation, translucent animated interface and outstanding graphics. Now follow the steps of how all this started.
The obstacles to overcome
iPhone SDK provides the capability of using camera through UIImagePickerController class. Usage of UIImagePickerController is feasible in the pop-up modal mode only. It also means that you have to reopen this view again to take the next picture. Moreover, the modal view contains additional panels and controls that overlay the camera view.
How the issues were handled
Nothing will be left unresolved. Enterra found an elegant solution to the above problems. The idea that crossed developers' mind was the following: to use UIImagePickerController as an ordinal non-modal view controller under the navigation controller in the way we use the other view controllers. To get and save a photo, a delegate was assigned and UIImagePickerControllerDelegate events processed. It was great up to the point that the Retake and Save buttons above the camera view didn't work when they were touched… It seemed it was necessary to completely recreate the UIImagePickerController instance to take another photo. Actually, it wasn't that simple! Moreover, there was a need to use the panels and buttons that overlaid the camera view…
We did it!
Finally, an awesome idea has crossed developers' minds! The solution was as follows. When touching the Shoot button, the view stops refreshing. A single image from the camera is on the display. Then it is necessary to touch the Retake or Save button. But is it possible to get the image and save it without using the UIImagePickerControllerDelegate? Is it possible to touch the Retake button programmatically to reset the view and get another photo? After touching the Shoot button there appeared a hidden view of ImageView type. Though the class hadn't been described in the SDK, its methods were explored using Objective-C capabilities. As a result, CGImage object was got and the image size was identical to the camera picture! The developers hid a number of views above the camera view and created custom button below the camera view to take the photo in one touch. The corresponding selector was got from the Shoot button and called from the custom action handler. To hide the overlaying camera views and controls and to create custom Shoot button, they were hidden before they had been added to the camera view. It was realized using Objective-C capability. In this method, it is checked that the passed view was one of the camera view subviews and set its "hidden" property to YES. So, the addSubview is replaced in the WillAppear view before the camera view had been created. Additionally, custom toolbar and Shoot button in the viewDidAppear after the camera view had been created.
Review the examples of source code and get more tips on how it was done: http://techzone.enterra-inc.com/iphone/custom-camera-applications-development-using-iphone-sdk/.
About Enterra
The company was founded in 2001. This is a multi-national company with offices based in Tampa (USA), Walldorf (Germany), Barnaul, Moscow (Russia). Enterra specializes in custom software development, business systems integration, software products licensing. It stands as Microsoft Gold Certified Partner, IBM Business Partner, Sun Partner. Its staff consists of over 60 highly professional specialists. For 8 years it has successfully accomplished over 300 projects.
# # #
|