When you are reading a news article, blog, or book (in iBooks or on Amazon's Kindle application, for example), nothing is more frustrating than having the iPad automatically rotate based on how you hold it - especially if you read in bed, your iPad will always be oriented 90 degrees in the wrong direction. Some applications include a mechanism within the app to prevent rotation; other apps only work in one orientation (portrait or landscape), regardless of orientation. Fortunately, for all other applications, your iPad comes with a switch that allows you to disable rotation and prevent the iPad's screen from changing orientation until you unlock the display and rotate the device in another direction. If the feature stopped working, see directly the "iPad lock no longer works" section.
Follow these steps to lock or unlock your iPad accelerometer:
That's all you need to do to temporarily enable or disable the accelerometer for rotation on your iPad: note that this switch only affects the orientation of the screen, and any application that uses the accelerometer to detect movements should still function as normal.
If you have upgraded your iPad to iOS 4, you will notice that you can no longer prevent your iPad screen from rotating based on how you hold it: this is because Apple has changed the default functionality of the toggle switch to allow you to mute your iPad.
Here's how you can restore its functionality to lock the device:
From this point on, the side switch will behave as it did in the past, and prevent your iPad screen from changing orientation regardless of how you hold it, once the switch is engaged (you will still see the locked circular arrow icon appear on screen as confirmation).