Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the iPhone detect the size of a touch?

Tags:

cocoa-touch

As far as I can tell the iPhone multitouch framework sends the location of each touch but not the size.

I want to allow the user to tap a button with the tip of their thumb, or to put the pad of their thumb across multiple buttons (not real UIButtons) and have my touch tracking code realize it needs to press all the buttons the thumb is over.

like image 410
Alex Wayne Avatar asked Feb 07 '09 21:02

Alex Wayne


People also ask

Can an iPhone measure something?

Use the Measure app and your iPhone camera to measure nearby objects. iPhone automatically detects the dimensions of rectangular objects, or you can manually set the start and end points of a measurement.

Can my phone measure size?

Google's augmented reality app “Measure” turns ARCore-compatible Android smartphones into digital measuring tapes, as reported by Ars Technica. Using the app appears to be rather simple. Simply launch Measure, point the phone's camera to an object, then pick two points to measure the distance in between.

How does iPhone measure surface area?

Find The Area Of A Surface Using Measure Just tap the circular plus button to find the length and width of the item you're measuring. Multiply the length times the width to find the surface area. You can also manually create a box by adding a point at every corner of the surface you're trying to measure.

How accurate is iPhone measure tool?

How accurate is it? In our early tests, pretty damn accurate, for the most part. I wouldn't use it to build the HyperLoop, but for basic household chores, it looks like it's reliable within a half-inch. But it's a bit finicky about your distance from the thing you're measuring.


2 Answers

All these answers are wrong. The fact that Apple doesn't appear to sanction this in apps on the store is a different matter.

 float vf = 10.0; 
 id valFloat = [thisTouch valueForKey:"pathMajorRadius"]; 
 if(valFloat != nil) {
   vf = [valFloat floatValue]; 
 }

I really wish that this issue would get pushed harder by users and developers.

like image 139
Rob Avatar answered Sep 23 '22 15:09

Rob


Since UITouch handles the touch and nothing is said about the size, i'd say no you can't. You better try another approch like a drag..

like image 26
CiNN Avatar answered Sep 20 '22 15:09

CiNN