views:

75

answers:

1

Is there a way to just take a photo with an iPhone?

(No delegates or controllers).

Actually what I want is:

1 One view that shows what the camera is seeing,

2) One button that takes a photo. (Like calling a function and getting the photo back)

added:The "view" above would be an area in a normal screen, also the button

Would this be the AVFoundation.

Thanks

+2  A: 

If you're just trying to use the camera the AVFoundation framework is way overdoing it, and it's meant more for sounds and movies. The basic camera methods are all in the UIKit framework. If you're trying to edit the images, the AVFramework isn't what you need.

Also, you cannot have an app without a delegate or a controller. That's how apps are made. Without them you can't do anything. See the Apple View Controller Programming Guide for more information.

Like falconcreek said, you need to use a UIImagePickerController and set the UIImagePickerDelegate to use the camera in an app.

Question: What are you trying to do with these images that the Camera app won't work?

MishieMoo
The two points in my question. To have on a normal view what the lens is showing and the button besides it (Seems difficult with the controller).
Olav
That is the default behavior of the controller. You just have to set the UIImagePickerController source as the camera.
MishieMoo