Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fenrus110

macrumors regular
Original poster
Mar 24, 2008
142
0
Not sure if this is even possible, but my client wants to auto bring up the keyboard and rotate the view to Landscape when the Device is placed on a flat surface.

From my experiences, rotation events only trigger if the device is perpendicular to the ground.

Not to mention, how the Device would know if the device is on the palm of a hand or on a table...
 
Checking the accelerometer values will give you the info you need, although you will probably need to accept a small range of rotation angles that are close enough to level in 2 axes that the surface can be considered "flat" - did you really mean "perpendicular to the gravity vector" when you said "flat'?

Chris
 
Not to mention, how the Device would know if the device is on the palm of a hand or on a table...

A human palm rarely stay as motionless as a table. Find a Tai Chi master, have him hold an iPhone as flat as possible for a few seconds. Any less deviation found by the accelerometer in the X and Y axis's over the course of a few seconds, and it's probably a table top.

.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.