How can I stop iPhone screen rotation?

UPDATE: iOS 4 features a built-in rotation lock function. Find out more information about how to use rotation lock here.

Some iPhone applications have preferences to set an accelerometer lock under Settings. When rotation is disabled, the orientation of the app stays fixed in one direction no matter which way the iPhone is turned.

Most commonly used apps such as Safari, Messaging, Mail and iPod do not have this feature available in the preferences. In contrast, orientation can be temporarily fixed when viewing photos on the iPhone Camera Roll or Photo Library.

To stop all apps from rotating when the device is turned around you can first install SBSettings on a jailbroken iPhone. There's an additional toggle available separately on Cydia that will lock the orientation of apps: Rotation Inhibitor.

After installing Rotation Inhibitor, you will have to activate the toggle. Swipe on your taskbar to open SBSettings and touch More -> Set Toggles. Turn on the Rotation toggle.

Now when you want to lock the orientation of apps in portrait mode just tap the Rotation toggle in SBSettings. To lock the orientation of apps in landscape mode, hold your finger on the Rotation toggle and it will cycle through the different orientation modes.

The mode you select will be the orientation apps will be locked to when rotation is disabled.


SORTED!
Now I can use TomTom in car and not get stressed out because arrow pointing wrong way :-)
Thankyou.

Great, so I have to hack my phone, jailbreak it, just so I can use it in a proper manner. Thanks for much Apple :(

Here’s how to lock your iPhone 4 and 3GS screen orientation:

•Double-tap the Home button on your iPhone to show the recently used apps bar.
•Swipe the recently used apps icons to the right until you see the iPod controls.
•Tap the rotation lock button. It’s to the left of the iPod controls.

great, it works!

That is great if you want to lock the screen into a portrait. I, however want to lock it in landscape mode. Especially when using the camera. If I hand my phone to someone to record a movie or take a picture and they are not iPhone users, more often than not, they will take the picture in vertically instead of horizontally (like you would with a regular digital camera) because there is a slight delay switching between modes. Anybody know a solution to this?

Im curious too.
Thanks so much for the person who showed how to lock in portrait though!
The constant flop flop on the slightest tilt was a pain.
I needed portrait and know the home screen is designed for portrait but can see the need to lock safari in landscape, especially with the wider screen of the iPhone 5.
Third party apps like Amazon give options to lock in portrait or landscape which is great.

Works great. Thanks!

That's great. Works a treat. Thank you.

Thank u and so simple!

Well done that man. Sooooooo simple when you know how. Thanxalot.

Thank you so very much for the help

Thank you for the help , your way helped Thanks again!!

my iphone is on lock rotation and when i double click the get up the last used icons there is no icon to unlock it, is there any other way and its very annoying

UPDATE 2014
Go to Home page.
Swipe upwards from the very bottom edge (off the screen).
The Control Panel menu should appear. Press the top right picture rotate icon to lock and unlock the portrait screen orientation rotation.
If your photo is not in the proper portrait orientation, then hit Edit on the Photo Roll image and Rotate it and Save.
(iPhone 4S on 3/28/2014)