You can lock your iPhone in portrait mode by swiping down from the top menu and hitting the button that shows a padlock inside a circle. This will lock the phone in place and prevent it from adjusting to landscape mode when turned.