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?

4 Answers 4


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.

  • You'd have to accelerate more than 1G, pretty impossible in most cars.
    – Agos
    Feb 9, 2011 at 16:20
  • Fair enough; better use a F1 car then :)
    – Nick Moore
    Feb 9, 2011 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.

  • +1: I was looking for that and you beat me to the punch. I always found that article fascinating. Feb 9, 2011 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. Feb 11, 2011 at 11:01
  • Oops, sorry, you´re right, Dave.
    – Asmus
    Feb 11, 2011 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?


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.

  • 2
    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, 2014 at 7:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .