title: How to produce landscape or portrait photo base on device orientation
body: <p>I reed this tutorial to create camera app - <a href="https://github.com/appcoda/FullScreenCamera" rel="nofollow noreferrer">1</a>: <a href="https://www.appcoda.com/avfoundation-swift-guide/" rel="nofollow noreferrer">https://www.appcoda.com/avfoundation-swift-guide/</a></p>
  <p>When I rotate my device to landscape and would like to take a landscape photo, the photo is always portrait. I really have know idea how to fix it. I hope the photo could display landscape or portrait base on user's device orientation.</p>
  <p>Thanks a lot!</p>