Skip to content

Commit

Permalink
Fix onboarding for iOS16
Browse files Browse the repository at this point in the history
  • Loading branch information
Ambrdctr committed Oct 28, 2022
1 parent 6fd875b commit 70ceee7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"location" : "https://github.com/Ambrdctr/SQRichTextEditor",
"state" : {
"branch" : "master",
"revision" : "739cf6a03daf78cd0bfd91449163f81a30b90b07"
"revision" : "0031e929633941ac0f63aee5759e1afb8b1dd8c1"
}
},
{
Expand Down
8 changes: 6 additions & 2 deletions Mail/Views/Onboarding/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,12 @@ struct OnboardingView: View {
}
.onAppear {
if UIDevice.current.userInterfaceIdiom == .phone {
UIDevice.current
.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
if #available(iOS 16.0, *) {
window?.windowScene?.requestGeometryUpdate(.iOS(interfaceOrientations: .portrait))
} else {
UIDevice.current
.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
}
AppDelegate.orientationLock = .portrait
}
}
Expand Down

0 comments on commit 70ceee7

Please sign in to comment.