How can I set certain view controller to be landscape and portrait and certain to be landscape only? Thanks .
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
Step 1. Create a subclass of UINavigationcontroller named like CustomNavController Step 2. initialise CustomNavController instead of UINavigationController in AppdDelegate.
Step 3. override following method of UINavigationController in CustomNavController
where ViewAsset is name of class which you need in both mode.
for more interesting tutorials check out https://appengineer.in/
1) Select the "device orientations" that you want in your project from the "Deployment Info" in the "General" tab.
2) In your view controller class, use this code:
3) For view controllers that you want to support both orientations: