My iPhone 4 screen stopped orienting itself when turned sideways
Double-press the HOME button, then slide the ribbon at the bottom of the screen from left to right. You should see the rotation lock icon; tap on it.
What does the rotation icon look like?
A lock with a circular arrow around it.
Retrieving data ...