Don't animate itemsView. #83

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

Originally created by @mjkoo711 on 4/24/2019

Hi, I'm MJ.

First, thank you for your open source.

I'm using your open source WhatsNewKit. But, I met a problem.

I want to animate views, but itemsview does not apply animation.

Below my code. Thank you.

import Foundation
import WhatsNewKit

class WhatsNewAppHandler {
  var whatsNewViewController: WhatsNewViewController?

  init() {
    let whatsNew = WhatsNew(
      title: "WhatsNewKit",
      items: [
        WhatsNew.Item(
          title: "Installation",
          subtitle: "You can install WhatsNewKit via CocoaPods or Carthage",
          image: UIImage(named: "IAPAds")
        ),
        WhatsNew.Item(
          title: "Open Source",
          subtitle: "Contributions are very welcome 👨‍💻",
          image: UIImage(named: "IAPAds")
        ),
        WhatsNew.Item(
          title: "Installation",
          subtitle: "You can install WhatsNewKit via CocoaPods or Carthage",
          image: UIImage(named: "IAPAds")
        ),
        WhatsNew.Item(
          title: "Installation",
          subtitle: "You can install WhatsNewKit via CocoaPods or Carthage",
          image: UIImage(named: "IAPAds")
        )
      ]
    )

    var configuration = WhatsNewViewController.Configuration()
    configuration.completionButton.backgroundColor = Color.Blue
    configuration.apply(animation: .slideUp)

    whatsNewViewController = WhatsNewViewController(
      whatsNew: whatsNew,
      configuration: configuration
    )
  }

  func showsWhatsNewApp(presentViewController: UIViewController) {

    if let whatsNewViewController = self.whatsNewViewController {
      whatsNewViewController.modalTransitionStyle = .coverVertical
      whatsNewViewController.modalPresentationStyle = .overFullScreen
      presentViewController.present(whatsNewViewController, animated: true)
    }
  }
}
*Originally created by @mjkoo711 on 4/24/2019* Hi, I'm MJ. First, thank you for your open source. I'm using your open source `WhatsNewKit`. But, I met a problem. I want to animate views, but `itemsview` does not apply animation. Below my code. Thank you. ``` import Foundation import WhatsNewKit class WhatsNewAppHandler { var whatsNewViewController: WhatsNewViewController? init() { let whatsNew = WhatsNew( title: "WhatsNewKit", items: [ WhatsNew.Item( title: "Installation", subtitle: "You can install WhatsNewKit via CocoaPods or Carthage", image: UIImage(named: "IAPAds") ), WhatsNew.Item( title: "Open Source", subtitle: "Contributions are very welcome 👨‍💻", image: UIImage(named: "IAPAds") ), WhatsNew.Item( title: "Installation", subtitle: "You can install WhatsNewKit via CocoaPods or Carthage", image: UIImage(named: "IAPAds") ), WhatsNew.Item( title: "Installation", subtitle: "You can install WhatsNewKit via CocoaPods or Carthage", image: UIImage(named: "IAPAds") ) ] ) var configuration = WhatsNewViewController.Configuration() configuration.completionButton.backgroundColor = Color.Blue configuration.apply(animation: .slideUp) whatsNewViewController = WhatsNewViewController( whatsNew: whatsNew, configuration: configuration ) } func showsWhatsNewApp(presentViewController: UIViewController) { if let whatsNewViewController = self.whatsNewViewController { whatsNewViewController.modalTransitionStyle = .coverVertical whatsNewViewController.modalPresentationStyle = .overFullScreen presentViewController.present(whatsNewViewController, animated: true) } } } ```
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#83
No description provided.