Skip to content

Commit b5ad613

Browse files
committed
Force portrait orientation for migration screens only
1 parent f6f51b7 commit b5ad613

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

WordPress/Jetpack/Classes/System/JetpackWindowManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ class JetpackWindowManager: WindowManager {
4343

4444
// TODO: Add logic in here to trigger migration UI if needed
4545
private var shouldShowMigrationUI: Bool {
46-
false
46+
true
4747
}
4848
}

WordPress/Jetpack/Classes/ViewRelated/WordPress-to-Jetpack Migration/Common/Navigation/MigrationNavigationController.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,22 @@ class MigrationNavigationController: UINavigationController {
1010
private var cancellable: AnyCancellable?
1111

1212
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
13+
if let presentedViewController {
14+
return presentedViewController.supportedInterfaceOrientations
15+
}
1316
if WPDeviceIdentification.isiPhone() {
1417
return .portrait
1518
} else {
1619
return .allButUpsideDown
1720
}
1821
}
1922

23+
// Force portrait orientation for migration view controllers only
2024
override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation {
21-
.portrait
25+
if let presentedViewController {
26+
return presentedViewController.preferredInterfaceOrientationForPresentation
27+
}
28+
return .portrait
2229
}
2330

2431
init(coordinator: MigrationFlowCoordinator, factory: MigrationViewControllerFactory) {

0 commit comments

Comments
 (0)