Skip to content

Whats New View

FUIWhatsNewViewController

open class FUIWhatsNewViewController: UIViewController

The 'FUIWhatsNewViewController' is used to display new features for the application. It takes an array of UIViewControllers, which represents each page and the user can swipe left and right to view content. We recommend using FUIWhatsNewDetailPageController or FUIWhatsNewDetailListController to display pages or list style content, but any UIViewController can be provided in case the developer wants to use their own design.

Usage

Implement Data Source Object

class DataSource: FUIWhatsNewViewControllerDataSource {

   func presentationViewControllers(for whatsNewViewController: FUIWhatsNewViewController) -> [UIViewController] {

       let pageController = FUIWhatsNewDetailPageController()
       pageController.imageView.image = UIImage(named: "cat")
       pageController.imageViewSize = CGSize(width: 66, height: 66)
       pageController.titleLabel.text = "Title text"
       pageController.descriptionTextView.text = "description text"
       // enable image only mode.
       pageController.isImageExpanded = true

       return [pageController]
    }

    func presentationIndex(for whatsNewViewController: FUIWhatsNewViewController) -> Int {
        return 0
    }
}

Implement Delegate Object to Monitor Events

The following events will be monitored:

  • Will transition to next controller
  • Finished transitioning to next controller
  • Finish flow by clicking on Close button

Initiate and Present the What's New Controller

let whatsNewController = FUIWhatsNewViewController()
whatsNewController.dataSource = dataSource
whatsNewController.delegate = delegate
present(whatsNewController)

Theming

Supported style classes

fdlFUIWhatsNewViewController_listheadlineLabel
fdlFUIWhatsNewViewController_pageheadlineLabel
fdlFUIWhatsNewViewController_detailLabel
fdlFUIWhatsNewViewController_whatsnewview
fdlFUIWhatsNewViewController_closeButton
fdlFUIWhatsNewViewController_startButton

Last update: April 14, 2021