touch

Losing touch events after MFMailComposerViewController is dismissed.

I'm calling a MFMailComposerViewController in my app and adding it as a subview to the UIView. When the user has finished with the e-mail I'm calling dismissModalViewControllerAnimated to remove it, but the app delegate no longer gets touch events and I don't know why. This only happens in OS 4.0+ though. ...

jQuery & touch devices like iPad: addClass method and preventDefault

When you listen for the touch events (touchstart, touchmove, touchcancel, touchend) on a touch device like the iPad, and in your touchstart eventhandler you are invoking preventDefault(), is it possible to add or remove classes in order to change the visible appearance of the touched element? When I try to add a class at that juncture, ...

WPF: Is there a possibility to "route" ordinary mouse events to touch events in Windows 7

I'm currently developing a touch screen application using C# (.NET 4.0) and WPF for Windows 7. My problem is that the driver of the touch screen I have available at the moment only generates mouse events. (The manufacturer unfortunately does not provide a genuine Windows 7 driver) So, currently I'm not able to do tests properly. Is ther...

Match a user drawn path to an image

Does anyone know of any tutorials or sample code that could help me achieve the following in an iPhone app (other than the offical Apple developer videos). A user draws a path on screen The path is compared to an already existing path to see if it matches A match is determined not just by shape but also by starting and ending at the co...

Webkit equivalent of :-moz-system-metric(touch-enabled)

:-moz-system-metric(touch-enabled) looks like a really useful CSS selector for working on mobile sites. Unfortunately Webkit is dominant on mobile touch devices so does anyone know if there is a Webkit equivalent? (Ideally it'd be good if this was managed by CSS3 media queries) Edit: Looks like it is supported in Gecko as a media que...

iPhone -- active region of UITabBar

On my simulator, a UITabBar appears to react to mouse clicks up to about 10 pixels above the visible bar. On the phone, it is hard to tell what is going on, but my experience has been that if I put a button right up against the tab bar, users will frequently aim for the button but end up tapping the tab bar, which can be extremely confu...

UITableView: Drag a row onto another one

I have a UITableView that represents a list of objects, I'd like the user to touch an object, drag it onto another one (as to combine them) and seeing the two disappearing and a new one appearing. I guess that I can't do this with the standard table view editing methods (a row cannot be dragged onto another one, am I right?). Shall I wri...

when a setOnTouchListener is set to webview - loadDataWithBaseURL does not work or shows the same old content

I am loading some sequence of pages while the user swipes/flings on the webview, using the animation effect of the viewflipper - to bring that iphone transition effect. I have two webviews added to a viewflipper. Added setOnTouchListener to both the webviews and using gesture detector for fling. After detecting the fling direction, I ...

transmit touch events from uiview to uiwebview

Hi, How to send touch events from uiview to uiwebview without using undocumented methods ? My problem is to hide/show the tabbar and navigation bar when the user touches the uiwebview. this actually needs customization of uiwebview which is not adviced. I am planning to put a transparent view on top of the uiwebview and then recieve th...

Duplicating finger movements Objective C

Hi, I was wondering how I would go about duplicating finger movements with a moving image view object. - ie. you move your finger and a few centimetres away from it, an image moves around the screen, mimicking the movements of the finger I'm sorry that I have absolutely no idea how to do this and I'm sorry if I'm asking for a lot of co...

UITableView: custom gestures make it scrolling no more

I have an UIViewController which contains a UITableView (subclassed) and another UIView (subclassed). They are on the same hierarchy level but the UIView is added last so it is the frontmost. I overrid touchesBegan/Moved/Ended to intercept the Gestures from the top UIView: my goal is to get the selected UITableViewCell and, if double tap...

Android: Custom button OnClickListener is not getting invoked

I have a custom button, on which I am capturing its onTouchEvent. public class CustomNumber extends ToggleButton { boolean drawGlow = false; float glowX = 0; float glowY = 0; float radius = 30; public CustomNumber(Context context) { super(context); } public CustomNumber(Context context, AttributeSet attrs) { super(context, ...

Android: Measure/detect covered area by a finger touch on screen (NOT only touch coordinates)

Hi I would like to get access to the area covered by a finger for each touch event on an Android. Every touch event will result in a coordinate pair X and Y independent of how big the finger and consequently the touch area is that triggered the event. I was wondering if there is a way to get the area data which triggered the touch eve...

UITableView: scrolling programmatically the content view

Hi i'm trying to forward the touches I receive from an UIView which is in front of an UITableView. But doins so I can't make the table scroll anymore (see here). So now I'm trying to make tha tableview scroll programmatically and I am looking at setContentOffset:animated: and scrollRectToVisible:animated: with having success only with t...

iPad touch events on <video> tag

Hi, I'm building a javascript-powered gallery on the iPad that can display both images and video. To browse the gallery, you can swipe left or right (similar to the iPad's Photo application). However, none of my touch events work when swiping over a <video> element. It seems to take over my touch events, even on elements that may have a...

HowTo - Test JS Touch Events on a Mac

I'm working to build a web app that uses the WebKit Touch Events JS API. How can I QA this app on my mac with touch events, and not be forced to swap between developing on a mac and testing on an iPhone. Ideas? ...

How do I properly clean up a UIButton

I am having issues with UIButton with the iPhone SDK. I've determined that when I have a UIButton held down when the parent is removed (and the uibutton subsequently removed), I get some strange behavior. In my case, the app stops receiving any input whatsoever, as if the cleaned up held-down button has hijacked the input system someho...

WebKit TouchEvents - Not accurate?

I'm using the following to capture Touch Events on an Iphone. document.addEventListener('touchmove', function(event) { event.preventDefault(); var touch = event.touches[0]; $('#touchPosition').text("Touch x:" + touch.pageX + ", y:" + touch.pageY); }, false); Strangely, I'm finding that the positions are wrong...

Dragging Out of a Table and Responder Chain

Hello everyone, I'm trying to build something where I can drag a person object from a UITableView into another UITableView. What I've got working so far is that when I select the item in the table to drag (UICustomTableViewCell), in the touchesMoved method, I pop the person object out of the cell and attach it to the superview. The p...

Android TouchEvent Camera and Video?

I have a camera view over a video view in my android application. I want to use touch for both views. For Example: If i touch the camera view, i want to perform specific actions for camera view. Similarly the Video view. Kindly, tell me how to perform touch events for both the views at the same time. | VideoView | | _ | |...