Want to lock your iOS app to portrait or landscape only?
Whether you're building a game, a dashboard, or just want full layout control, this video shows you how to set orientation in SwiftUI and UIKit.
🤔 What You'll Learn:
✅Why orientation locking is useful (games, kiosks, UX)
✅How to set allowed orientations in Xcode's Deployment Info
✅How to enforce orientation via Info.plist
✅How to apply it in both SwiftUI and UIKit
📄 Full Code & Resources:
https://ndcswift.github.io/Swift-Proj...
👍 Like & Subscribe for more Swift, UIKit, and Xcode tips!
⏱️Timestamps
0:00 - Intro
0:34 - Adjusting App Settings in Xcode (Deployment Info)
1:28 - Info.plist Method
2:00 - How it looks on the simulator
2:33 - Tips for orientation
3:02 - SwiftUI Preview
3:30 - UIKit App Delegate
4:07 - Outro & Recap