Enterra Inc has advanced the development of Custom Camera iPhone applications

Enterra Inc has advanced the development of Custom Camera iPhone applications

iPhone applications for taking photos look really great. Thought 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 with all of you! Get the idea of how it works! Have a look on the application from the inside.

Marvelous iPhone application

We developed a new application iUniqable. iUniqable allows you to send photos with notes to them from your iPhone to Facebook or Flickr. We developed it 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 we had to tackle

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 we handled the issues

Nothing can be left unresolved. We knew from the start that we would find an elegant solution to the above problems. The idea that crossed our 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 we assigned a delegate and processed UIImagePickerControllerDelegate events. 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 we needed to fully recreate the UIImagePickerController instance to take another photo. Actually, it wasn't that simple! Moreover we still were needed to use the panels and buttons that overlayed the camera view?

We did it!

Finally, an awesome idea has crossed our mind! The solution was the following. When we touched the Shoot button, the view stoped refreshing. The single image from the camera was on display. Then we had to touch the Retake or Save button. Could we get the image and save it without using the UIImagePickerControllerDelegate? Could we touch the Retake button programmatically to reset the view and get another photo? We noticed that after touching the Shoot button there was a hidden view of ImageView type. Though the class hadn't been described in the SDK, we explored its methods using Objective-C capabilities. As a result we returned CGImage object and the image size was identical to the camera picture! We hid a number of views above the camera view and created our own button below the camera view to take the photo in one touch. We got the corresponding selector from the Shoot button and called it from our action handler. To hide the overlaying camera views and controls and to create our own button, we hid them before they had been added to the camera view. It was realized using Objective-C capability. In this method we checked that the passed view was one of the camera view subviews and set its' "hidden" property to YES. So, we replaced the addSubview in the viewWillAppear before the camera view had been created. Additionally we created our toolbar and Shoot button in the viewDidAppear after the camera view had been created

You can get the examples of source code and get more tips on how we did it here http://techzone.enterra-inc.com/iphone/custom-camera-applications-development-using-iphone-sdk/ Feel free to visit the website of the developer http://www.enterra-inc.com

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.
Company: Enterra, Inc.
Share |

Related press releases