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

popview show wrong orientation when app force landscape #353

Open
CoderMaurice opened this issue Sep 1, 2021 · 1 comment
Open

popview show wrong orientation when app force landscape #353

CoderMaurice opened this issue Sep 1, 2021 · 1 comment

Comments

@CoderMaurice
Copy link

CoderMaurice commented Sep 1, 2021

One problem with forcing landscape is that the status bar disappears, I think it is the reason of orientation problem

The weird thing is, if I connect the USB cable, everything works fine, when I disconnect USB calble and restart App, the problem shows

Can you add Specified direction in supportedInterfaceOrientations

public enum SupportedInterfaceOrientation {
                
                /** Uses standard supported interface orientation (target specification in general settings) */
                case standard
                
                /** Supports all orinetations */
                case all
                
                case specified(orientation: UIInterfaceOrientationMask)
            }
    override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
        guard let lastAttributes = lastAttributes else {
            return super.supportedInterfaceOrientations
        }
        switch lastAttributes.positionConstraints.rotation.supportedInterfaceOrientations {
        case .specified(let orientation):
            return orientation
        case .standard:
            return super.supportedInterfaceOrientations
        case .all:
            return .all
        }
    }
@MarkSpit
Copy link

MarkSpit commented Sep 22, 2022

I created a PR for this: #375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants