how can we make touch enable to a camera view? - iphone

can we do like that a user touch on the camera view and on this touch we can identify touch locations on this view.
i use the uiimagepickercontroller and added it on a button to the current view, after adding how can i identify the touch on this camera view that pop up after touch on any button.
Thanks
Balraj verma

You can use the new 3.1 Camera API's to turn off the camera controls, and then get a view into which you can add you own subview which detects touches anywhere on the screen.

Related

UIImagePickerController does not forward pinch/zoom events (multi touch) to the CameraOverlayView

I have developed an application on the appstore that uses an overlay over the camera (UIImagePickerController) which the user can pan and zoom using touch gestures. The overlay view is a subclass to a UIView and overrides the touches events from UIResponder to modify the overlay view accordingly.
This works fine in iOS3-4 but zoom stopped working for iOS5. It seems as the UIImagePickerController does only forward single touch events and takes over the pinching gestures to enable zoom of the camera.
Do anyone know how to handle this? I would like to disable the zoom of the camera and enable it on my overlay view again.
Solved by adding the Overlay view on top of window instead of using cameraoverlayview.

iOS Touches Began

What I want: Touch a button and a view is added right where the touch is. Without having to lift the finger the touches began/moved automatically begins working on the UIView. So without lifting the finger, I have touched the button and can drag the new view around.
What I don't know how to do:
Stop the touch events on the button and immediately send the touch events to the new view that is directly under the finger.
One option could be to ditch the button and just use the uiview touches to detect when to add the subview you want to let the user drag...
Daniel
As #Daniel suggested ditch the button and just use a UIView, but I believe you may need to have a UIPanGestureRecognizer in place to get your dragging.
You could set a flag when a new UIView is created and then forward any gesture events to that view - only while the user still has their finger down from the initial touch.
After the user has lifted their finger the new view can just deal with gestures by itself by adding a UIPanGestureRecognizer to it.

custom slide to reveal toolbar

i want to do a custom toolbar, something like the slide to unlock of android phones. In idle state, the user can see a button of the bottom left of the page. the user would then tap it, drag towards the right. When the user reaches the right end, the toolbar will then 'lock'. Buttons would be located at the toolbar.
I'm think of using a customview and touchmoved functions, but what I don't know how is how to make the view move with the touch, and how to actually lock the bar.
Everytime you move your finger the touchmoved function is called. In the touchmoved function you have to redraw the whole view or just set a new frame for this view. It pretty simple as you already know how to detect touches and react on them.

How can I detect a touch on an animated subview ? Or click an animated UIButton?

I have a view that is moving. The view is sometimes on and sometimes off screen - it is twice the width of the screen.
In this view, there are buttons that I need to be able to click.
I've tried doing this in many ways already - using pure buttons
using touches began on UIView
I'm doing the animation using a CGPath in core animation
Any help would be most appreciated
Thanks
Whether the view is moving or not should irrelevent to the touch detection. If you have a UIButton object and are handling the UIEventControlTouchUpInside (forgot the exact name) event , it should be called when it sees a touch. Is that not working for you?

No touchesbegan: in live camera area of UIImagePickerController

in my UIImagePickerController (camera shooting view), I want to track touches.
Every touch event gets properly called except for touchesbegan:
It's not a typo or something because touchesbegan: had been called up to the moment,
I've changed the controller from UIViewController to UIImagePickerController.
Why is touchesbegan: not called in UIImagePickerController?
How do I achieve this?
Update: It works. But only on the controls (which are located at the bottom). It doesn't work in the camera live picture.
Add a transparent view over the preview area, subclass UIView and capture touch events there?