Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rotate] supportedInterfaceOrientations default value is .all #315

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/Infra/EKRootViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class EKRootViewController: UIViewController {

override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
guard let lastAttributes = lastAttributes else {
return super.supportedInterfaceOrientations
return .all
}
switch lastAttributes.positionConstraints.rotation.supportedInterfaceOrientations {
case .standard:
Expand Down
12 changes: 12 additions & 0 deletions Source/Infra/EKWindowProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ final class EKWindowProvider: EntryPresenterDelegate {
entryVC.setStatusBarStyle(for: attributes)

entryWindow.windowLevel = attributes.windowLevel.value

if #available(iOS 13.0, *) {
switch attributes.displayMode {
case .inferred:
entryWindow.overrideUserInterfaceStyle = .unspecified
case .light:
entryWindow.overrideUserInterfaceStyle = .light
case .dark:
entryWindow.overrideUserInterfaceStyle = .dark
}
}

if presentInsideKeyWindow {
entryWindow.makeKeyAndVisible()
} else {
Expand Down