SwiftKickMobile / SwiftMessages

A very flexible message bar for UIKit and SwiftUI.
MIT License
7.24k stars 741 forks source link

Add orientation to config #506

Closed ullstrm closed 1 year ago

ullstrm commented 1 year ago

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

kurtulusahmet commented 1 year ago

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 commented 1 year ago

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.