Squished layout on iPad in multitasking #58

Closed
opened 2025-10-14 15:57:58 -06:00 by navan · 0 comments
Owner

Originally created by @lvandal on 9/22/2020

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

*Originally created by @lvandal on 9/22/2020* ## 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](https://user-images.githubusercontent.com/157723/93915145-923e2000-fcd5-11ea-9b69-0f6fd154b53f.png)
navan 2025-10-14 15:57:59 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/WhatsNewKit#58
No description provided.