SvenTiigi/WhatsNewKit

Squished layout on iPad in multitasking

lvandal opened this issue · 4 comments

WhatsNewKit Environment

  • iOS version: 14.0
  • WhatsNewKit version: 1.3.6
  • Xcode version: 12.0
  • Swift version: 5.0
  • macOS version running Xcode: 10.15.6
  • Dependency manager (SPM, Carthage, CocoaPods, Manually): SPM

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

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.

Yes, it is now fixed. Thanks so much!

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

Hey @lvandal

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