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

Add orientation to config #506

Closed

Conversation

ullstrm
Copy link

@ullstrm ullstrm commented Nov 1, 2022

By using this code, we can solve the problems we have had on iOS16 with SwiftMessages not respecting the shouldAutorotate property.

Comment on lines +322 to +324
If a view controller is created to host the message view, which interface
orientation should it support? The default is 'nil', meaning it will use the
default value for UIViewController in the current environment.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment has similar wording as the shouldAutorotate-property.

@kurtulusahmet
Copy link

Hello, First of all, thank you very much for the solution. We are also having problems using shouldAutorotate on iOS16 devices in our application. When we tried this solution, we found it worked. Could you please approve the merge of the pull request into the code?

@wtmoose
Copy link
Member

wtmoose commented Feb 10, 2023

Sorry, I missed this PR. SwiftMessages already provides a way to supply a custom WindowViewController subclass, which you can configure pretty much however you want.

config.windowViewController = { config in return MyWindowViewController(config: config) }

This is preferred over trying to put every possibly feature that might be needed into SwiftMessages.Config.

@wtmoose wtmoose closed this Feb 10, 2023
rmucenieks pushed a commit to rmucenieks/SwiftMessages that referenced this pull request Nov 22, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants