Other Classes

The following classes are available globally.

  • A base collection view layout class using section layout manager for generating layout attributes for views in a collection view.

    See more

    Declaration

    Swift

    open class FUIBaseCollectionViewLayout<LayoutManager> : UICollectionViewLayout where LayoutManager : FUISectionLayoutManager
  • A collection view section layout manager that computes the position and size in a section. This is a base class which defines the common properties of a collection section. This class is not supposed to be used directly. Instead, subclass this one and implement prepare() for calculating frames for views in collection view.

    See more

    Declaration

    Swift

    open class FUISectionLayoutManager : NSObject
  • The base view of a calendar cell view.

    This is for SAPFiori internal use only.

    See more

    Declaration

    Swift

    public class FUIBaseDrawingCalendarItemCollectionViewCell<InnerView> : FUIBaseCalendarItemCollectionViewCell, FUIStyleByStringAttributes, InnerViewContainer where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIStyleByStringAttributes
  • Gridline properties for an Axis.

    See more

    Declaration

    Swift

    public class FUIChartGridlineAttributes : FUIChartLineAttributes
  • Style definition for the chartView. Gives access to the chart theming.

    See more

    Declaration

    Swift

    public class FUIChartStyle : Equatable
  • The default implementation of the FUITintAttributesProvider with FUIControlState as the TintState type.

    See more

    Declaration

    Swift

    open class FUIControlStateTintAttributesProvider : FUITintAttributesProvider
  • Undocumented

    See more

    Declaration

    Swift

    public class FUIMultiLineText : FUIText
  • UICollectionView subclass, which invokes a sizeChangeHandler: (() -> Void)? closure, when the current content size of the collection does not match the intrinsic content size. The sizeChangeHandler property is internal to the SDK.

    Developers should generally not initialize FUIResizingCollectionView directly. Instead, instances of the class are typically accessed through the FUITableViewCollectionSection API’s.

    Important

    Resizing behavior will only be executed, if the sizeChangeHandler is implemented.

    Declaration

    Swift

    @available(*, deprecated, message: "If using as subview of UITableViewCell: use FUICollectionViewTableViewCell instead; if using generally: use UICollectionView instead.")
    public class FUIResizingCollectionView : UICollectionView
  • Undocumented

    See more

    Declaration

    Swift

    public class ObservableArray<Element> : Sequence, ObservableObject where Element : ObservableObject, Element : Hashable, Element : Identifiable
    extension ObservableArray: Collection
    extension ObservableArray: RandomAccessCollection
  • FUIBarButtonItem is an enhanced UIBarButtonItem to provide a way to specify the image to be displayed based on the state when title is nil or empty.

    For now, only normal and disabled states are used.

    See more

    Declaration

    Swift

    open class FUIBarButtonItem : UIBarButtonItem
  • A UITableViewHeaderFooterView subclass, which supports top and bottom padding and separators.

    See more

    Declaration

    Swift

    open class FUIBaseTableViewHeaderFooterView : UITableViewHeaderFooterView, FUIViewBorderDrawing
  • Undocumented

    Declaration

    Swift

    open class FUIDrawingView : FUIBaseDrawingView, FUIAttributesProvider
  • The base class for an Inline Validation form table view cell.

    See more

    Declaration

    Swift

    open class FUIInlineValidationDrawingTableViewCell<InnerView> : FUIBaseDrawingTableViewCell<InnerView>, InnerViewContainerEventHandling, FUIInlineValidation where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIStyleByStringAttributes
  • UIView subclass to draw text and glygh image using TextKit apis. Typically not used by developer.

    See more

    Declaration

    Swift

    public class FUITextKitView : UIView, PrepareForReuse, FUIContentCopyable
  • Undocumented

    See more

    Declaration

    Swift

    open class FUITintableDrawingView<T> : FUIBaseDrawingView, FUITintAttributesProvider, FUIAttributesProvider, FUIEnabledComponent, FUIStyleTintByStringAttributes, TintStyleGrabbing where T : Defaultable, T : Enableable, T : Hashable
  • A FUIDimensionSelector object is a horizontal control made up of multiple segments, each segment functioning as a discrete button. Selection is mutually exclusive.

    Code usage:

    let dimensionSelector = FUIDimensionSelector(titles: titles)
    dimensionSelector.selectedIndex = 1
    dimensionSelector.interItemSpacing = 20
    dimensionSelector.selectionDidChangeHandler = { [weak self] index in
    print("selected: \(index ?? -1)")
    }
    
    

    Styling

    Attribute setting:

    Setting the items’ styling for title and border with setAttribute(attribute, for:). Currently .normal, .selected and .disabled are supported.

    let attribute = FUISegmentAttribute(textColor: .red, borderColor: .blue)
    dimensionSelector.setAttribute(attribute: attribute, for: .selected)
    

    Theming

    fdlFUIDimensionSelector {
    title-color: green;
    title-color-selected: red;
    title-color-disabled: gray;
    border-color: blue;
    border-color-selected: orange;
    border-color-disabled: gray;
    interItem-spacing: 20;
    title-inset: 5 10 5 10;
    content-inset: 0 40 0 40;
    }
    
    See more

    Declaration

    Swift

    open class FUIDimensionSelector : UIView
  • The FUITableViewCollectionSection control is designed to be used, when a section in a UITableView should be dedicated to displaying a UICollectionView, and, the height of that section should adjust to fit its contents.

    FUITableViewCollectionSection

    The collection section produces a single FUICollectionViewTableViewCell, which refreshes its height, after its subview FUICollectionView calculates the sizes of its subview UICollectionViewCell items.

    A developer uses the FUITableViewCollectionSection, by assigning a data source (/and delegate) to its collectionView: FUICollectionView property; then, he or she should supply its collectionViewTableViewCell property to a UITableViewDataSource.tableView(_:cellForRowAt:) implementation.

    Important

    A developer should retain a strong reference to a FUITableViewCollectionSection.

    ## Usage

        let workorders: [WorkOrder] = [WorkOrder]()
    
        override public func viewDidLoad() {
    
            let workOrdersLayout = FUICollectionViewLayout.horizontalFlow
            workOrdersLayout.itemSize = CGSize(width: 200, height: 200)
            self.workOrdersSection = FUITableViewCollectionSection(tableView: self.tableView, collectionViewLayout: workOrdersLayout)
            self.workOrdersSection.collectionView.dataSource = self
            self.workOrdersSection.collectionView.register(FUISimpleCollectionViewCell.self, forCellWithReuseIdentifier: FUISimpleCollectionViewCell.reuseIdentifier)
            self.workOrdersSection.collectionView.delegate = self
            self.workOrdersSection.collectionView.isScrollEnabled = false
    
            self.tableView.estimatedRowHeight = 98
            #if swift(>=4.2)
                self.tableView.rowHeight = UITableView.automaticDimension
            #else
                self.tableView.rowHeight = UITableViewAutomaticDimension
            #endif
    
        }
    
        // MARK:  UITableViewDataSource
        override public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
            return 1
        }
    
        public override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
            return self.workOrdersSection.collectionViewTableViewCell
        }
    
        // MARK:  UICollectionViewDataSource
        public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    
            switch collectionView {
            case workOrdersSection.collectionView:
                let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUISimpleCollectionViewCell.reuseIdentifier,
                                                                              for: indexPath) as! FUISimpleCollectionViewCell
                cell.contentImageView.image = UIImage(named: "WorkOrderImage")
                cell.titleLabel.text = "Work Order: \(indexPath.item)"
                return cell
            default:
                // ...
            }
        }
    
    See more

    Declaration

    Swift

    open class FUITableViewCollectionSection
  • UITableViewDiffableDataSource subclass to support editing for the cells in table view.

    See more

    Declaration

    Swift

    open class FUIEditableTableViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType> : UITableViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType> where SectionIdentifierType : Hashable, ItemIdentifierType : Hashable
  • This class is an implementation of FUIAttachmentAction to allow users to choose items using PHPickerViewController from the Photo Library as attachments in FUIAttachmentsFormView.

    The implementation uses a PHPickerViewController to let user choose items from Photo Library.

    See more

    Declaration

    Swift

    @available(iOS 14.0, *)
    open class FUIAddPhotoLibraryItemsAttachmentAction : FUIAttachmentAction
    extension FUIAddPhotoLibraryItemsAttachmentAction: PHPickerViewControllerDelegate
  • This class is an implementation of FUIAttachmentAction to allow user to choose a file using UIDocumentPickerViewController as an attachment in FUIAttachmentsFormView.

    If the application wants to have its Document directory accessible by the UIDocumentPickerViewController, the application needs to have the following 2 properties set to true in its plist:

    • “Supports opening documents in place” (LSSupportsOpeningDocumentsInPlace)
    • “Application supports iTunes file sharing” (UIFileSharingEnabled)

    Note that the file URL returned by the document picker is a temporary url. The content of the file may not be available after the document picker is closed. Therefore, developer should copy the file content to a location that it may attach the file content later.

    
    class TestFormTableViewController: FUIFormTableViewController {
        override func viewDidLoad() {
            // ...
    
            // prepare temporary directory to hold attachment files
        }
    
        // ...
    
        override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
            // ...
    
            let cell = tableView.dequeueReusableCell(withIdentifier: FUIAttachmentsFormCell.reuseIdentifier, for: indexPath) as! FUIAttachmentsFormCell
            cell.attachmentsController.delegate = self
            cell.attachmentsController.dataSource = self
            cell.attachmentsController.reloadData()
    
            let documentPickerAction = FUIDocumentPickerAttachmentAction()
            documentPickerAction.delegate = self
            cell.attachmentsController.addAttachmentAction(documentPickerAction)
    
            return cell
        }
    }
    
    extension TestFormTableViewController: FUIDocumentPickerAttachmentActionDelegate {
        var documentPicker: UIDocumentPickerViewController {
          return UIDocumentPick  erViewController(documentTypes: ["public.data"], in: .import)
        }
    
        func documentPickerAttachmentAction(_ action: FUIDocumentPickerAttachmentAction, didPickFileAt url: URL) {
            if let savedUrl = saveFileToTempFolder(url) {
                self.addAttachmentURL(savedUrl)
            }
            self.tableView.reloadSections(IndexSet(integer:self.attachmentSection), with: .automatic)
       }
    }
    

    Attention

    The delegate object with type FUIDocumentPickerAttachmentActionDelegate is declared as a weak reference. On deallocation it will be automatically set to nil. To keep it alive as expected, developer should retain the delegate object during its whole execution scope.

    See more

    Declaration

    Swift

    open class FUIDocumentPickerAttachmentAction : NSObject, FUIAttachmentAction
    extension FUIDocumentPickerAttachmentAction: UIDocumentPickerDelegate
  • The content view of a form cell.

    See more

    Declaration

    Swift

    open class FUIFormCellContentView<ValueView, T, Text> : FUITintableDrawingView<T> where ValueView : UIView, ValueView : Initializable, T : Defaultable, T : Enableable, T : Hashable, Text : FUITextProtocol, Text : Initializable
  • Base view for map snapshot form cell. Typically not used directly by developer.

    See more

    Declaration

    Swift

    public class FUIFormEntryView<FormValueView> : FUIBaseDrawingView, FUITitleComponent, FUIStatusComponent, FUIAttributesProvider where FormValueView : UIView
  • Inner content view for map snapshot form cell. Typically not used directly by developer.

    Declaration

    Swift

    public class FUIMapSnapshotContentView : FUIFormEntryView<FUITextKitView>
  • Map snapshot form cell, where the custom geometry is shown on a map-based imagery.

    Developer may specify the geometry object to display, and configure the title text, status text, and accessory type.

    This cell height is automatically adjusted to allow the whole content to be displayed.

    Usage

    let snapshotFormCell = tableView.dequeueReusableCell(withIdentifier: FUIMapSnapshotFormCell.reuseIdentifier,
                                                         for: indexPath) as! FUIMapSnapshotFormCell
    snapshotFormCell.title.text = "Location"
    snapshotFormCell.geometry = self.provider?.editingGeometry
    if let coordinates = snapshotFormCell.coordinates {
       let numOfPoints = coordinates.count
       snapshotFormCell.status.text = numOfPoints > 1 ? "\(numOfPoints) Points Added" : "\(numOfPoints) Point Added"
    }
    snapshotFormCell.accessoryType = .disclosureIndicator
    return snapshotFormCell
    
    See more

    Declaration

    Swift

    public class FUIMapSnapshotFormCell : FUIBaseDrawingTableViewCell<FUIMapSnapshotContentView>
  • The base class for auto-fitting form table view cell, such as FUINoteFormCell.

    Declaration

    Swift

    open class FUIAutofittingDrawingTableViewCell<InnerView> : FUIInlineValidationDrawingTableViewCell<InnerView> where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIStyleByStringAttributes
  • The content view of a FUINoteFormCell.

    See more

    Declaration

    Swift

    open class FUINoteFormCellContentView : FUIFormCellContentView<FUITextView, FUIControlState, FUIText>, FUITitleComponent, FUIValueComponent, FUIPlaceholderComponent, UITextViewDelegate
  • FUIOrderPickerFormCell is a UITableViewCell subclass, which is used in the advanced sort pattern when there are multiple sort criteria involved. The component allows users to adjust priority of sort criteria and switch order direction flexibly.

    ## Usage Example:

     let cell = tableView.dequeueReusableCell(withIdentifier: FUIOrderPickerFormCell.reuseIdentifier, for: indexPath) as! FUIOrderPickerFormCell
    
     cell.value = [
     FUISortCriterion(criterion: FUIMultiLineText("Priority"),
                      isSelected: true,
                      isAscending: false,
                      ascendingText: FUIMultiLineText("Lowest first"),
                      descendingText: FUIMultiLineText("Highest first")),
     FUISortCriterion(criterion: FUIMultiLineText("Name"),
                      isSelected: false,
                      isAscending: true,
                      ascendingText: FUIMultiLineText("Ascending"),
                      descendingText: FUIMultiLineText("Descending"))
    ]
    
    cell.onChangeHandler = { [unowned self] change, newValue in
         // change contains the info about immediate change to sort criterions
         // newValue contains the latest array of sort criterions
    }
    
    return cell
    
    
     // more customization options
     // change the title
     cell.title = FUIText("Order by", font: UIFont.preferredFioriFont(forTextStyle: .largeTitle), textColor: UIColor.preferredFioriColor(forStyle: .negativeLabel))
    
     // change the selected icon for all sort criterions
     let config = UIImage.SymbolConfiguration(font: UIFont.preferredFioriFont(forTextStyle: .body))
     let icon = UIImage(systemName: "checkmark.circle", withConfiguration: config)
     cell.selectedIcon = icon
    
     // change the appearance of labels in sort criterion with font, textColor and numberOfLines in FUIMultiLineText
     FUIMultiLineText("Priority", font: UIFont.preferredFioriFont(forTextStyle: .body), textColor: UIColor.purple)
    
     // other options
     cell.atLeastOneSelected = false
     cell.isContentCopyable = false
    
    

    ## Theming

    Supported TEXT class paths:

        fdlFUIOrderPickerFormCell_title
        fdlFUIOrderPickerFormItemCell_title {}
        fdlFUIOrderPickerFormItemCell_subtitle {}
    

    Supported TEXT properties:

        font-color: Color;
        font-style: UIFontTextStyle;
    

    Supported IMAGE class paths:

        fdlFUIOrderPickerFormItemCell_leadingImageView {}
    

    Supported IMAGE properties:

        image-name: UIImage;
        font-style: UIFontTextStyle;
        tint-color: UIColor;
    

    See Theming support in FUIOrderPickerFormView and FUIOrderPickerFormItemView

    See more

    Declaration

    Swift

    public class FUIOrderPickerFormCell : FUIBaseDrawingTableViewCell<FUIOrderPickerFormView>, FUIContentCopyable
  • The table view cell in FUIOrderPickerFormCell

    Theming

    Supported TEXT class paths:

       fdlFUIOrderPickerFormItemView_title {}
       fdlFUIOrderPickerFormItemView_subtitle {}
    

    Supported TEXT properties:

       font-color: Color;
       font-style: UIFontTextStyle;
    

    Supported IMAGE class paths:

       fdlFUIOrderPickerFormItemView_leadingImageView {}
    

    Supported IMAGE properties:

       image-name: UIImage;
       font-style: UIFontTextStyle;
       tint-color: UIColor;
    
    See more

    Declaration

    Swift

    public class FUIOrderPickerFormItemCell : FUIBaseDrawingTableViewCell<FUIOrderPickerFormItemView>, FUIContentCopyable
  • The content view of FUIOrderPickerFormItemCell. Standard Fiori control for rendering business object data.

    See more
  • The content view of FUIOrderPickerFormCell. Standard Fiori control for rendering business object data.

    See more

    Declaration

    Swift

    public class FUIOrderPickerFormView : FUITintableDrawingView<FUIControlState>, FUITitleComponent, FUIContentCopyable, UITableViewDataSource, UITableViewDelegate
  • FUIRatingControl uses images to represent a rating.

    The number of “On” images denotes the rating. The default “On” image is a filled star while the default “Off” inmage is an unfilled star.

    When the style property is .editable, user can tap an individual image to set the rating. Users can also slide their finger from side to side over the control to select the rating. The FUIRatingControl will send UIControl.Event.valueChanged event when rating changed.

    Theming

    Supported FUIRatingControl class paths:

    fdlFUIRatingControl
    

    Supported RatingControl properties:

    on-color { -standard | -accented | -editable-disabled | -editable-disabled }: Color;
    off-color { -standard | -accented | -editable-disabled | -editable-disabled }: Color;
    on-image { -standard | -editable }: Image;
    off-image { -standard | -editable }: Image;
    
    See more

    Declaration

    Swift

    open class FUIRatingControl : UIControl, Initializable
  • This is the content view of the FUIRatingControlFormCell.

    This view includes a FUITextKitView for title, a FUIRatingControl for the rating control, and another FUITextKitView for subtitle. When subtitle is not nil, the title will not be displayed.

    See more
  • The reusable UI component implemented as an UITableViewCell which includes a FUIRatingControl to allow user select a rating.

    This form cell uses FUIRatingControlContentView as its content view. FUIRatingControlContentView includes a FUITextKitView for hosting the keyName property, a FUIRatingControl for the rating control, and another FUITextKitView for subtitle.

    When the text in subtitle is not nil, the title will not be displayed.

    Control Styles

    The available style for the FUIRatingControl can be set by developer to editable, editableDisabled, standard, or accented.

    Example

    control.style = .editable
    control.ratingBounds = 0...5
    control.rating = 3
    control.onImage = UIImage(named: "filledStar").withRenderingMode(.alwaysTemplate)
    control.onImage = UIImage(named: "openStar").withRenderingMode(.alwaysTemplate)
    control.setTintColor(.orange, for: 0..<1)
    control.setTintColor(.red, for: 1..<5)
    control.setTintColor(.purple, for: 5..<6)
    

    Theming

    nuiClass:

    fdlFUIRatingControlFormCell {}
    

    Supported TEXT class paths:

    fdlFUIRatingControlFormCell_title {}
    

    Supported TEXT properties:

    font-color: Color;
    font-style: UIFontTextStyle;
    

    Supported FUIRatingControl class path:

    fdlFUIRatingControlFormCell_ratingControl
    

    Supported RatingControl properties:

    on-color { -standard | -accented | -editable-disabled | -editable-disabled }: Color;
    off-color { -standard | -accented | -editable-disabled | -editable-disabled }: Color;
    on-image { -standard | -editable }: Image;
    off-image { -standard | -editable }: Image;
    
    See more

    Declaration

    Swift

    open class FUIRatingControlFormCell : FUIInlineValidationDrawingTableViewCell<FUIRatingControlContentView>
  • The content view of a FUISwitchFormCell.

    See more

    Declaration

  • This is an implementation of FUIFormattedStringEditing on top of the regular iOS NumberFormatter.

    The main enhancement is to add the support to handle cursor positions.

    Here are two examples when using with the FUITextFieldFormCell:

    • As a currency number formatter

      let cell = tableView.dequeueReusableCell(withIdentifier: FUITextFieldFormCell.reuseIdentifier) as! FUITextFieldFormCell
      cell.keyName = "Price"
      cell.keyboardType = .decimalPad
      let formatter = FUINumberFormatter()
      formatter.numberStyle = .currency
      cell.formatter = formatter
      ...
      

      The text field will display “$12.34” when user types “12.34”.

    • With custom suffix

      let cell = tableView.dequeueReusableCell(withIdentifier: FUITextFieldFormCell.reuseIdentifier) as! FUITextFieldFormCell
      cell.keyName = "Weight"
      cell.keyboardType = .decimalPad
      let formatter = FUINumberFormatter()
      formatter.numberStyle = .decimal
      formatter.maximumFractionDigits = 3
      formatter.positiveSuffix = "lbs"
      cell.formatter = formatter
      

      The text field will display “1.234lbs” when user types “1.234”.

    Declaration

    Swift

    open class FUINumberFormatter : NumberFormatter, FUIFormattedStringEditing
  • A FUIFormattedStringEditing implementation to format phone number.

    This formatter accepts only digit characters 0 through 9. All other characters user typed are ignored.

    The default format is “(###) ###-####”. Which correspond to US phone number system. Developer could change the format to fit phone number for other countries.

    See more

    Declaration

    Swift

    open class FUIPhoneNumberFormatter : FUIFormattedStringEditing
  • The content view of an FUITextFieldFormCell.

    See more

    Declaration

  • The FUIGridRowSummaryItem is a subclass of FUIGridRowTextItem for representing a summary item in FUIGridTableViewCell. FUIGridRowSummaryItem is different from FUIGridRowTextItem in terms of style.

    Theming

    Supported style classes

    fdlFUIGridRowSummaryItem_label
    
    See more

    Declaration

    Swift

    open class FUIGridRowSummaryItem : FUIGridRowTextItem
  • FUIGridTableViewHeaderFooterView is a FIori UI component that extends UITableViewHeaderFooterView for showing a list of FUIGridRowItem column titles. It will display as a section header or footer in table view.

    Columns widths may be specified in absolute points, or as a set of fractions in 0.0..<1. A developer may also designate one column for flexible width, by assigning the value -1 to that column width.

    Remark

    Developers should always use the same column widths or percents for all headers, footers and rows in a grid. Developers should also set common accessory types to rows, headers and footers.

    The FUIGridTableViewHeaderFooterView is adaptive for regular and compact horizontal content modes. It is hidden by design, when in compact mode. The AutoLayout automatic dimension technique should be used for computing the height.

    Example Initialization and Configuration:

    override open func viewDidLoad() {
    super.viewDidLoad()
    tableView.sectionHeaderHeight = UITableViewAutomaticDimension
    tableView.estimatedSectionHeaderHeight = 100
    tableView.register(FUIGridTableViewHeaderFooterView.self, forHeaderFooterViewReuseIdentifier: FUIGridTableViewHeaderFooterView.reuseIdentifier)
    }
    

    Override tableView(_: viewForHeaderInSection:) dataSource method and configure header.

    // header data list
    var headerData: [FUIGridRowItem] {
    let item0 = FUIGridRowHeaderItem(text: " ")
    let item1 = FUIGridRowHeaderItem(text: "Symbol")
    let item2 = FUIGridRowHeaderItem(text: "Open")
    let item3 = FUIGridRowHeaderItem(text: "High")
    let item4 = FUIGridRowHeaderItem(text: "Low")
    let item5 = FUIGridRowHeaderItem(text: "Close")
    return [item0, item1, item2, item3, item4, item5]
    }
    
    // set column widths.  Should be shared by rows and header.
    let columnWidths = [-1, 0.2, 0.1, 0.1, 0.1, 0.1]
    
    // configure header view
    header.items = headerData
    header.columnWidthPercent = columnWidths
    header.accessoryType = .disclosureIndicator // match row cell accessory types!
    
    
    See more

    Declaration

    Swift

    open class FUIGridTableViewHeaderFooterView : FUIBaseTableViewHeaderFooterView, FUIContentCopyable
  • FUIGridTableViewSummaryFooter is a Fiori UI component that extends UITableViewHeaderFooterView for showing a list of FUIGridRowItem column titles. It displays as a section footer in table view.

    Columns widths may be specified in absolute points, or as a set of fractions in 0.0..<1. A developer may also designate one column for flexible width, by assigning the value -1 to that column width.

    Remark

    Developers should always use the same column widths or percents for all headers, footers and rows in a grid. Developers should also set common accessory types to rows, headers and footers.

    The FUIGridTableViewSummaryFooter is adaptive for regular and compact horizontal content modes. It is hidden by design, when in compact mode. The AutoLayout automatic dimension technique should be used for computing the footer height.

    Example Initialization and Configuration:

    override open func viewDidLoad() {
    super.viewDidLoad()
    tableView.sectionFooterHeight = UITableViewAutomaticDimension
    tableView.estimatedSectionFooterHeight = 100
    tableView.register(FUIGridTableViewSummaryFooter.self, forHeaderFooterViewReuseIdentifier: FUIGridTableViewSummaryFooter.reuseIdentifier)
    }
    

    Override tableView(_: viewForFooterInSection:) dataSource method and configure header.

    // header data list
    var footerData: [FUIGridRowItem] {
    let item0 = FUIGridRowSummaryItem(text: "Total")
    let item1 = FUIGridRowSummaryItem(text: "10")
    let item2 = FUIGridRowSummaryItem(text: "10")
    let item3 = FUIGridRowSummaryItem(text: "10")
    let item4 = FUIGridRowSummaryItem(text: "10")
    let item5 = FUIGridRowSummaryItem(text: "10")
    return [item0, item1, item2, item3, item4, item5]
    }
    
    // set column widths.  Should be shared by rows and header.
    let columnWidths = [-1, 0.2, 0.1, 0.1, 0.1, 0.1]
    
    // configure header view
    footer.items = headerData
    footer.columnWidthPercent = columnWidths
    footer.accessoryType = .disclosureIndicator // match row cell accessory types!
    
    

    Declaration

    Swift

    open class FUIGridTableViewSummaryFooter : FUIGridTableViewHeaderFooterView
  • A view controller showing popover list for creating geometry in map view.

    Usage

    Initialize the popover content view controller.

    var popoverContent = FUICreateGeometryPopOverTableViewController()
    

    Define selection behavior and do some setup for map legend items.

    @objc private func presentCreatePopover() {
       popoverContent.items = createGeometryItems
       popoverContent.modalPresentationStyle = .popover
       let popover = popoverContent.popoverPresentationController
       let createGeometryResultsController = CreateGeometryResultsController()
       popoverContent.didSelectHandler = { [unowned self] createItem in
           createGeometryResultsController.editingGeometryMapLegendItem = createItem
           self.navigationController?.pushViewController(createGeometryResultsController, animated: true)
       }
       popover?.barButtonItem = plusBarButtonItem
       self.present(popoverContent, animated: true, completion: nil)
    }
    
    See more

    Declaration

    Swift

    open class FUICreateGeometryPopOverTableViewController : FUIResizablePopoverContainer, UITableViewDelegate, UITableViewDataSource
  • A subclass of MKPointAnnotation which conforms to FUIAnnotation and it is tied to a callout tag showing the name of a route on the map.

    See more

    Declaration

    Swift

    open class FUICalloutAnnotation : MKPointAnnotation, FUIAnnotation
  • FUIEditingGeometryObject a generic object that specifies the accepted FUIGeometryType, Representation Type, and Map Type.

    Variables Available in FUIEditingGeometryObject:

    • geometry: The geometry associated with the editing object

    • cachedGeometry: The cached instance of the geometry

    • cachedIndex: The cached index for polylines and polygons for their selected index

    Methods Available in FUIEditingGeometryObject:

    • addRepresentation(to context: MapContextType): A method to add the geometry to the map.

    • removeRepresentation(from context: MapContextType): A method to remove the geometry from the map.

    • redrawRepresentation(in context: MapContextType, with existingCoordinates: [CLLocationCoordinate2D], scheme: FUIBackgroundColorScheme, traits: UIUserInterfaceStyle): A method to re-draw the geometry display in the map.

    See more

    Declaration

    Swift

    public class FUIEditingGeometryObject<GeometryType, RepresentationType, MapContextType> : FUIManageRepresentation where GeometryType : FUIGeometry
  • Wrapper class of geometry types

    Declaration

    Swift

    public class FUIGeometryBaseTypeWrapper<PointType, PolylineType, PolygonType> : FUIGeometryTypeWrapper where PointType : FUIInitCoordinate, PolylineType : FUIInitCoordinates, PolygonType : FUIInitCoordinates
  • MKPointAnnotation subclass to support selection state.

    Declaration

    Swift

    public class FUIMKPointAnnotation : MKPointAnnotation
  • A generic class supports both MapKit and Esri for storing route segments and stops information.

    See more

    Declaration

    Swift

    open class FUIRoute<LineGeometry, PointGeometry> where LineGeometry : FUIPolyline, PointGeometry : FUIPoint
    extension FUIRoute: Hashable
  • A subclass of FUIMapFloorplanViewController designed to be used with ArcGIS framework. You can use it to display business objects(points, polylines, polygons) on the map view and view details by selecting a business object. It also supports clustering of point geometries.

    Usage

    The map view consists of mutiple FUIGeometryLayers. By assigning geometries onto different layers, you can show/hide all geometries on a specified layer using setLayerHidden(_:hidden:) api.

    1. Implement FUIEsriMapViewDataSource methods.

    In the floorplan controller viewDidLoad() set the datasource.

    self.dataSource = dataSource
    
    func numberOfLayers(in mapView: AGSMapView) -> Int {
       return 1
    }
    
    func mapView(_ mapView: AGSMapView, layerAtIndex index: Int) -> FUIGeometryLayer {
       return FUIGeometryLayer("Functional Location")
    }
    
    func mapView(_ mapView: AGSMapView, geometriesForLayer layer: FUIGeometryLayer) -> [AGSGeometry] {
       return geometries
    }
    

    You can also use native ArcGIS api to add graphics to map view. But the FUIEsriMapViewDelegate object is not able to manage these graphics.

    1. Implement FUIEsriMapViewDelegate methods as needed.

    Determine the visual presentation of the geometry. (color, size, etc)

    func mapView(_ mapView: AGSMapView, willRender graphic: AGSGraphic, forGeometryAtIndex index: Int, in layer: FUIGeometryLayer, in state: FUIMapFloorplan.State) {
       graphic.symbol = customizedSymbol
    }
    
    func mapView(_ mapView: AGSMapView, willRender clusterGraphic: AGSGraphic, for geometryIndexesInLayers: [FUIGeometryLayer : [Int]], in state: FUIMapFloorplan.State) {
       clusterGraphic.symbol = customizedSymbol
    }
    

    Respond to select/deselect action

    func mapView(_ mapView: AGSMapView, didSelect geometry: AGSGeometry, at index: Int, in layer: FUIGeometryLayer) {}
    
    func mapView(_ mapView: AGSMapView, didSelect geometries: [AGSGeometry], at geometryIndexesInLayers: [FUIGeometryLayer: [Int]]) {}
    
    func mapView(_ mapView: AGSMapView, didDeselect geometry: AGSGeometry, at index: Int, in layer: FUIGeometryLayer) {}
    
    func mapView(_ mapView: AGSMapView, didDeselect geometries: [AGSGeometry], at geometryIndexesInLayers: [FUIGeometryLayer: [Int]]) {}
    

    Theming

    See more
  • A subclass of FUIMKMapFloorplanViewController designed to be used with MapKit framework. It adds additional functionality to map floorplan controller to support routes display.

    Usage

    Create a FUIRoute instance for each route you want to display. Make sure your route stop geometry type extends MKPointAnnotation and FUIAnnotation, and route segment geometry type extends MKPolyline and FUIOverlay.

    1. Implement FUIMKRoutingMapViewDataSource methods.

    In the routing floorplan controller viewDidLoad() set the datasource.

    self.dataSource = dataSource
    
    func numberOfRoutes(in mapView: MKMapView) -> Int { return 1 }
    
    func mapView(_ mapView: MKMapView, routeAt index: Int) -> FUIRoute<MKPolyline, MKPointAnnotation> { return fuiRoute }
    
    1. FUIMKRoutingMapViewDelegate provides more functionalities that you can make your app more powerful.

    In the floorplan controller viewDidLoad() set the delegate.

    self.delegate = delegate
    

    Determine how annotation view/overlay renderer should appear. You can customize the view/render provided with fiori default styles.

    func mapView(_ mapView: MKMapView, willRender annotationView: MKAnnotationView, forVertexAtIndex vertexIndex: Int, inRouteAt routeIndex: Int, in state: FUIMapFloorplan.State) {
       switch annotationView {
       case is FUICircleAnnotationView:
           (annotationView as! FUICircleAnnotationView).innerColor = .red
       case is FUIMarkerAnnotationView:
           (annotationView as! FUIMarkerAnnotationView).markerTintColor = .blue
       default:
           break
       }
    }
    

    Respond to route select/deselect action

    func mapView(_ mapView: MKMapView, didSelectRouteAt index: Int)
    
    func mapView(_ mapView: MKMapView, didSelectVertexAt vertexIndex: Int, inRouteAt routeIndex: Int)
    
    func mapView(_ mapView: MKMapView, didDeselectRouteAt index: Int)
    
    func mapView(_ mapView: MKMapView, didDeselectVertexAt vertexIndex: Int, inRouteAt routeIndex: Int)
    

    Theming

    See more

    Declaration

    Swift

    open class FUIMKRoutingFloorplanViewController : FUIMKMapFloorplanViewController
  • Declaration

    Swift

    public class FUIMapDetailTagObjectView : FUIObjectView, FUITagsComponent
  • FUIObjectCard is a collection view UI component which extends FUIBaseAccessoryDrawingCollectionViewCell for showing rich business information for an object in a card format, including tags and rating. The FUIObjectCard can also be configured to use single action button.

    Initialization and Configuration:

    To use FUIObjectCard, it should be dequeued from a UICollectionView and returned in its data source method.

    Example of setting an FUIObjectCard by implementing cellForItemWith in the collection view:

       cell.title.text = "Business Object Title"
       cell.subtitle.text = "Business Object Subtitle"
       cell.footnote.text = "Business Object Footnote"
       cell.tags = [FUITag(title: "Tag - 1"), FUITag(title: "Tag - 2"), FUITag(title: "Tag - 3")]
       cell.rating = 5
       cell.trailingProperties = [.tags, .footnote, .rating]
       cell.status.text = "$26.99"
       cell.actionAccessoryType = .button
       cell.actionAccessoryView?.button.setImage(FUIIconLibrary.system.cartAdd.withRenderingMode(.alwaysTemplate), for: .normal)
       cell.actionAccessoryView?.button.contentMode = .center
    

    Tags Compression Behavior:

    Based on Fiori Global Design guidance, if the content size of tags component goes beyond one line, it will be truncated automatically to be fitted into one line display mode with a placeholder showing a title of “+x more” information (x means the number of remaining tags that are hidden). Please note that the compression will not work when the tag’s content is too long or only one tag is set.

    Trailing Properties:

    The order of trailing properties, including .tags, .footnote and .rating, can be set by the developer. By default, the trailing properties is set to [.footnote, .rating, .tags]. If there are duplicated trailing properties, only the first one will be displayed.

    Default Styling:

    Depending on the selection state, the tint color and button style of hierarchy icon, the font size of the title text, and the cell’s background color will be updated automatically.

    Theming:

    Supported class paths:

    fdlFUIObjectCard {}

    Please refer to FUIObjectCardContentView documentation for all supported attributes.

    See more

    Declaration

    Swift

    open class FUIObjectCard : FUIBaseAccessoryDrawingCollectionViewCell<FUIObjectCardContentView>, InnerViewContainerEventHandling, FUIContentCopyableView
  • Base inner view showing business object information for FUIObjectCard.

    Example Initialization and Configuration:

    let view = FUIObjectCardContentView()
    view.title.text = "Business Object Title"
    view.subtitle.text = "Business Object Subtitle"
    view.footnote.text = "Business Object Footnote"
    view.status.text = "Business Object Status"
    view.statusImageView.image = UIImage(named: <#image#>)
    view.tags = [FUITag(title: "Tag - 1"), FUITag(title: "Tag - 2"), FUITag(title: "Tag - 3")]
    view.rating = 5
    view.trailingProperties = [.rating, .tags, .footnote]
    view.iconImages = ["1", FUIIconLibrary.indicator.veryHighPriority.withRenderingMode(.alwaysTemplate)]
    

    Theming

    Supported TEXT class paths:

    fdlFUIObjectCardContentView_title {} fdlFUIObjectCardContentView_subtitle {} fdlFUIObjectCardContentView_footnote {} fdlFUIObjectCardContentView_status {}

    Supported TEXT properties:

    font-color: Color; font-style: UIFontTextStyle; text-align: NSTextAlignment;

    Supported IMAGE class paths:

    fdlFUIObjectCardContentView_detailImageView {}

    Supported IMAGE properties:

    tint-color: Color;

    See more

    Declaration

    Swift

    open class FUIObjectCardContentView : FUIObjectViewBase, FUIObjectCardComponent
  • Typically not used by developer

    See more

    Declaration

    Swift

    open class FUIBaseAccessoryDrawingCollectionViewCell<InnerView> : FUIBaseDrawingCollectionViewCell<InnerView> where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIReactingToAccessory, InnerView : FUIStyleByStringAttributes
  • Typically not used by developer

    See more

    Declaration

    Swift

    open class FUITableViewAccessoryDrawingCollectionViewCell<InnerView> : FUIBaseAccessoryDrawingCollectionViewCell<InnerView> where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIReactingToAccessory, InnerView : FUIStyleByStringAttributes
  • A base class that is the FUIBaseDrawingTableViewCell subclass for presenting an object view inside a table view cell, which defines common layout elements shared by FUIObjectTableViewCell and FUIHierarchyItemTableViewCell.

    See more

    Declaration

    Swift

    open class FUIObjectBaseTableViewCell<InnerView> : FUIBaseDrawingTableViewCell<InnerView>, FUIContentCopyable where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIObjectBaseDrawing, InnerView : FUIReactingToAccessory, InnerView : FUIStyleByStringAttributes
  • Typically not used by developer

    See more
  • A UISegmentedControl subclass with Fiori styles.

    Usage:

    let segmentControl = FUISegmentControl(items: ["Segment 1", "Segment 2", "Segment 3"])
    segmentControl.addTarget(self, action: #selector(selectionChange(segmentControl:)), for: .primaryActionTriggered)
    

    Use segment control in a container with dark background

    segmentControl.backgroundColorScheme = .darkConstant
    

    Theming

    fdlFUISegmentControl {
       background-color (Color)
       background-image { -selected | -highlighted | -disabled } (Image)
    
       tint-color (Color)
       selected-segment-tint-color (Color)
    
       // The divider image to be used when both left and right segment are in normal state
       divider-image (Image)
    
       font-color { -selected | -highlighted | -disabled } (Color)
    
       text-shadow-color { -selected | -highlighted | -disabled } (Color)
       text-shadow-offset { -selected | -highlighted | -disabled } (Size)
    
       font-name { -selected | -highlighted | -disabled } (FontName)
       font-size { -selected | -highlighted | -disabled } (Size)
       font-style { -selected | -highlighted | -disabled } (UIFont.TextStyle)
    }
    
    See more

    Declaration

    Swift

    open class FUISegmentControl : UISegmentedControl, FUIAttributedStringDrawing
  • FUITimelineNowIndicatorCell is a UITableViewCell subclass, designed to present now indicator in a Timeline view.

    ## Usage

    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "FUITimelineNowIndicatorCell", for: indexPath) as! FUITimelineNowIndicatorCell
        return cell
    }
    
    

    ## Notes ### SingleLine Separator Between Timeline Items in the Table The default table view separatorStyle is .singleLine. Because of this default setting, there can be a 1.0 px divider line or a separator in-between each item on the timeline in the table. This is not an issue in timeline. To get rid of the separator, set separatorStyle to none in the TabelViewController class

    
     override func viewDidLoad() {
        super.viewDidLoad()
        // ...
        self.tableView.separatorStyle = .none
        // ...
     }
    
    

    ### Hide the Separator in the next Timeline Items in the Table The Separator can be hiden in the next Timeline cell as following

        cell.separatorLineView.isHidden = true
    

    ## Theming Supported style classes

     fdlFUITimelineNowIndicatorCell
     fdlFUITimelineNowIndicatorCell_nodeImageView
     fdlFUITimelineNowIndicatorCell_indicatorLine
    
    See more

    Declaration

    Swift

    open class FUITimelineNowIndicatorCell : NibDesignableFUIBaseTableViewCell, FUIStyleSheetAttributesApplying
  • Section layout manager subclass specifically designed for FUIStandardAutoSizingColumnFlowLayout which layout the cells in columns with the same width.

    See more

    Declaration

    Swift

    open class FUIStandardAutoSizingColumnSectionLayoutManager : FUISectionLayoutManager
  • Manager class which supplies color palette values to Fiori components, and the UIColor.preferredFioriColor(...) API.

    Changes made to the manager affect all future calls to UIColor.preferredFioriColor(...). Most components do not reload dynamically, so calls to the ThemeManager should happen at the beginning of the application lifecycle.

    Note

    AppDelegate.didFinishLaunching(withOptions...) is the recommended location.

    Example Usage

    // Pin palette version used by application to a specific version (defaults to `.latest`)
    FUIThemeManager.shared.setPaletteVersion(.v3_x)
    
    // Override some color definitions to match your application palette
    FUIThemeManager.shared.setColor(.darkGray, for: .primary2, background: .light)
    FUIThemeManager.shared.setHexColor("1b931d", for: .positive, background: .light)
    
    See more

    Declaration

    Swift

    public class FUIThemeManager