If you are looking to restrict a temporary user, like a friend who you hand the phone to so that he can view a picture, check your phone's settings to see if the "pinning" option is available. On my phone it is at
settings > general > security > screen pin
When an app is pinned, any attempt to leave the app goes to the lock screen.