Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have always wondered how the orientation/autorotation hardware works inside an iPhone/iPad/iPod Touch.

Originally I thought it was the accelerometer but I don't think it is as an accelerometer can only measure movement and the iPhone knows it's current orientation without any movement.

I have assumed until now that there is a little tilt switch inside the phone as well as the accelerometer and that this is used, but really I have no idea and Google isn't helping much! ;)

Anyone know how it works?

share|improve this question
up vote 2 down vote accepted

In the older iOS devices it's the accelerometer - it is detecting the constant acceleration due to gravity.

Normal motion produces only short bursts of acceleration, not long enough to trigger rotation.

If you put your iOS device in a fast car and accelerated it for several seconds you could probably get it to autorotate the wrong way.

share|improve this answer
You'd have to accelerate more than 1G, pretty impossible in most cars. – Agos Feb 9 '11 at 16:20
Fair enough; better use a F1 car then :) – Nick Moore Feb 9 '11 at 16:39

It´s called a gyroscope. Have a look at this article on iFixit, it explains it (within an iPhone 4) quite well.

share|improve this answer
+1: I was looking for that and you beat me to the punch. I always found that article fascinating. – Philip Regan Feb 9 '11 at 11:32
That is a fascinating article, but this is not how the autorotation works as the gyroscope was new in the iPhone 4 and autorotation has been supported since the first gen iPhone. – Dave Verwer Feb 11 '11 at 11:01
Oops, sorry, you´re right, Dave. – Asmus Feb 11 '11 at 11:38

From what I know, the iPhone (and iPod Touch) didn't have a gyroscope until the latest model. Are you guys sure it's not the accelerometer that did this, and now it is the gyroscope in the most recent models?

share|improve this answer

I talked to a person about this topic (who was skilled in electronics as well as in software development), he answered, there is a special IC (integrated circuit) integrated on the circuit boards of some modern mobile phones that determines which edge of the phone is currently downwards which is used in autorotation of screen using software (the driver of the IC). When the screen is kept horizontally, no change in the screen orientation occurs because none of the edges of the phone is found downwards.

share|improve this answer
Could you explain what this answer provides that other answers here have not covered or expand your answer to provide more information than the others? – M K Jun 23 '14 at 7:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.