This post will show you how to lock the auto-focus on your iPhone camera (or your iPad camera).
The camera is great, and you can get to the camera in an instant, even from the lock-screen so you never have to miss a potential photograph. But sometimes the autofocus goes nuts. There is a way to lock the focus to a certain point though:
With the camera open: touch and hold the screen for a second or two.
The autofocus will lock, so when you move your camera around, your iPhone wont try to re-focus.
To set the camera autofocus back to normal, just touch the screen.