SvenTiigi / WhatsNewKit

Showcase your awesome new app features 📱
https://sventiigi.github.io/WhatsNewKit/
MIT License
3.87k stars 190 forks source link

Squished layout on iPad in multitasking #45

Closed lvandal closed 3 years ago

lvandal commented 3 years ago

WhatsNewKit Environment

What did you do?

Displaying the WhatsNew view with default layout values on iPad in multitasking

What did you expect to happen?

The layout should consider the trait collection

What happened instead?

The layout is being squished

`private func showWhatsNew() { // Initialize WhatsNew let versionStore: WhatsNewVersionStore = KeyValueWhatsNewVersionStore()

    var configuration = WhatsNewViewController.Configuration(
        theme: .default
    )
    configuration.tintColor = UIColor(named: "someTintColor")!
    configuration.itemsView.imageSize = .preferred

    let whatsNew = WhatsNew(
        // The Title
        title: SSKLocalizedString("STR_WHATS_NEW"),
        // The features you want to showcase
        items: [
            WhatsNew.Item(
                title: "XYZ",
                subtitle: "Blah blah",
                image: UIImage(systemName: "bolt.fill")
            ),
            ...,
            ...,
        ]
    )

    // Initialize WhatsNewViewController with WhatsNew
    if let whatsNewViewController = WhatsNewViewController(
        whatsNew: whatsNew,
        configuration: configuration,
        versionStore: versionStore) {
        self.present(whatsNewViewController, animated: true)
    }
}`

ipad-layout

SvenTiigi commented 3 years ago

Hey @lvandal

Thanks for your bug report and sorry for the delayed response I was on vacation.

Please checkout the feature branch trait-collection-fix and let me know if this resolves your issue.

lvandal commented 3 years ago

Yes, it is now fixed. Thanks so much!

SvenTiigi commented 3 years ago

Perfect 👍 I will leave a comment as soon as the bug fix is available within a new release of WhatsNewKit

SvenTiigi commented 3 years ago

Hey @lvandal

The bug fix is now available with the new release of WhatsNewKit 1.3.7