I want to show a YouTube video cover (with an aspect ratio of 16:9) in the center of the top half of the screen with respect to the device’s orientation. How can I achieve it in the Xcode storyboard?
what I have done so far:
- added a Stack view and adjusted it in the top half of the safe area.
- Set the alignment to center
- Set the content mode to Aspect Fit
- added a UIView to the stack view
- set the aspect ratio