Page View

  • This controller is based on the standard UIPageViewController to navigate between sibling controllers.

    • There are ‘Previous’ and ‘Next’ buttons in the bottom tool bar to help user navigation. This is in addition to the user swipe gestures handled in the UIPageViewController.

    • The title of the navigation controller consists of a page index title and a page subtitle. Please refer to FUIPageViewController.TitleView.

    Theming

    Supported TEXT class paths:

    fdlFUIPageViewController_title {}
    fdlFUIPageViewController_subtitle {}
    

    Supported TEXT properties:

    font-color: (Color)
    font-style: (UIFontTextStyle)
    

    Supported BarButtonItem class paths:

    fdlFUIPageViewController_nextButtonItem
    fdlFUIPageViewController_previousButtonItem
    

    Supported UIBarButtonItem properties:

    font-color { -disabled } (Color)
    font-style: { -disabled } (UIFontTextStyle)
    image { -disabled } (Image)
    
    See more

    Declaration

    Swift

    open class FUIPageViewController : UIPageViewController
    extension FUIPageViewController: UIPageViewControllerDelegate
    extension FUIPageViewController: UIPageViewControllerDataSource
  • FUIPageViewControllerDataSource is to provide the data information for a FUIPabeViewController.

    FUIPageViewControllerDataSource extends the standard iOS UIPageViewControllerDataSource and adding an optional function to allow developer to specify the presentation title for the page view.

    See more

    Declaration

    Swift

    @objc
    public protocol FUIPageViewControllerDataSource : UIPageViewControllerDataSource
  • 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
    
    See more

    Declaration

    Swift

    open class FUIWhatsNewViewController : UIViewController
    extension FUIWhatsNewViewController: UIPageViewControllerDataSource, UIPageViewControllerDelegate
  • Page style controller to be used in FUIWhatsNewViewController.

    Components:

    • imageView
    • titleLabel
    • descriptionTextView

    Usage

     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 in which image takes entire space and title and description become hidden.
     pageController.isImageExpanded = true
    
    See more

    Declaration

    Swift

    open class FUIWhatsNewDetailPageController : UIViewController
  • List style controller to be used in FUIWhatsNewViewController.

    Components:

    • collectionView

    Usage

     class CollectionViewDataSource: UICollectionViewDataSource {
        func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
            return 2
        }
    
        func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
            let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUIWhatsNewCollectionViewCell.reuseIdentifier, for: indexPath) as! FUIWhatsNewCollectionViewCell
            switch indexPath.item {
            case 0:
                cell.detailImageViewSize = CGSize(width: 66, height: 66)
                cell.detailImageView.image = UIImage(named: "cat")
                cell.headlineLabel.text = "headline text"
                cell.subheadlineLabel.text = "subheadline text"
            case 1:
                // configure cell
            }
    
            return cell
        }
     }
    
     let listController = FUIWhatsNewDetailListController()
     listController.collectionView.dataSource = CollectionViewDataSource()
    
    See more

    Declaration

    Swift

    open class FUIWhatsNewDetailListController : UIViewController, UICollectionViewDataSource, UICollectionViewDelegate
  • The FUIBaseDrawingCollectionViewCell subclass is used to show new feature items in FUIWhatsNewDetailListController. It has a similar setup and layout to FUIObjectCollectionViewCell.

    ## Usage

     let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUIWhatsNewCollectionViewCell.reuseIdentifier, for: indexPath) as! FUIWhatsNewCollectionViewCell
     cell.detailImageViewSize = CGSize(width: 66, height: 66)
     cell.detailImageView.image = UIImage(named: "cat")
     cell.headlineLabel.text = "headline text"
     cell.subheadlineLabel.text = "subheadline text"
    

    ## Theming Supported style classes

     fdlFUIWhatsNewCollectionViewCell_headlineLabel
     fdlFUIWhatsNewCollectionViewCell_subheadlineLabel
     fdlFUIWhatsNewCollectionViewCell_footnoteLabel
     fdlFUIWhatsNewCollectionViewCell_descriptionLabel
     fdlFUIWhatsNewCollectionViewCell_statusLabel
     fdlFUIWhatsNewCollectionViewCell_substatusLabel
    
    See more

    Declaration

    Swift

    open class FUIWhatsNewCollectionViewCell : FUIBaseDrawingCollectionViewCell<FUIWhatsNewCollectionItemView>
  • Base view of FUIWhatsNewCollectionViewCell. Standard Fiori control for rendering new feature items.

    Usage

    let view = FUIWhatsNewCollectionItemView()
    view.detailImageViewSize = CGSize(width: 66, height: 66)
    view.detailImageView.image = UIImage(named: "cat")
    view.headlineLabel.text = "headline text"
    view.subheadlineLabel.text = "subheadline text"
    

    Theming

    Supported style classes

    fdlFUIWhatsNewCollectionItemView_headlineLabel
    fdlFUIWhatsNewCollectionItemView_subheadlineLabel
    fdlFUIWhatsNewCollectionItemView_footnoteLabel
    fdlFUIWhatsNewCollectionItemView_descriptionLabel
    fdlFUIWhatsNewCollectionItemView_statusLabel
    fdlFUIWhatsNewCollectionItemView_substatusLabel
    

    Declaration

    Swift

    open class FUIWhatsNewCollectionItemView : FUIObjectView
  • This protocol provides the method for the callback function for FUIWhatsNewViewControllerDataSource. It will be used by the application to feed in the data for the view content.

    See more

    Declaration

    Swift

    public protocol FUIWhatsNewViewControllerDataSource : AnyObject
  • This protocol provides the method for the callback function for FUIWhatsNewViewControllerDelegate.

    It will be used by the application to customize the What’s New Screen.

    See more

    Declaration

    Swift

    public protocol FUIWhatsNewViewControllerDelegate : AnyObject