Other Classes
The following classes are available globally.
-
UICollectionViewCellsubclass forFUIDataTableCardViewcard type, whereFUIDataTableare centered in the card.Extends
FUIDataTableCardViewAPI, by extension onFUIBaseDrawingCollectionViewCell.Usage
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUIDataTableCardCollectionViewCell.reuseIdentifier, for: indexPath) as! FUIDataTableCardCollectionViewCell cell.title.text = "Machine Health Monitoring" cell.subtitle.text = "ID 3940151" cell.status.text = "3hr" self._innerView.data = [[FUIText("Need Attention"), FUIText("Yesterday")], [FUIText("Stable"), FUIText("Jul 5, 2021")], [FUIText("Need Attention"), FUIText("Jul 4, 2021")]] return cellTheming
Supported
TEXTclass paths:fdlFUIDataTableCardCollectionViewCell_title {} fdlFUIDataTableCardCollectionViewCell_subtitle {} fdlFUIDataTableCardCollectionViewCell_status {} fdlFUIDataTableCardCollectionViewCell_footnote {} fdlFUIDataTableCardCollectionViewCell_textItem {}: TEXT theme for all cells in FUIDataTable. It has lowest priority. fdlFUIDataTableCardCollectionViewCell_textItem_row2 {}: TEXT theme for one speciif column in FUIDataTable. # is the column index. It has third priority. fdlFUIDataTableCardCollectionViewCell_textItem_column1 {}: TEXT theme for one specific row in FUIDataTable. # is the row index; header is row 0 if it existis. It has second priority. fdlFUIDataTableCardCollectionViewCell_textItem_row2_column1{}: TEXT theme for one specific cell. Row index and column index are required. It has highest priority.Supported
TEXTproperties:font-color: Color; font-style: UIFontTextStyle; text-line-clamp: Integer; text-align: NSTextAlignment;Supported
IMAGEclass paths:fdlFUIDataTableCardCollectionViewCell_imageItem {}: IMAGE theme for all cells in FUIDataTable. It has lowest priority. fdlFUIDataTableCardCollectionViewCell_imageItem_column# {}: IMAGE theme for one speciif column in FUIDataTable. # is the column index. It has third priority. fdlFUIDataTableCardCollectionViewCell_imageItem_row# {}: IMAGE theme for one specific row in FUIDataTable. # is the row index; header is row 0 if it existis. It has second priority. fdlFUIDataTableCardCollectionViewCell_imageItem_row#_column# {}: IMAGE theme for one specific cell in FUIDataTable. Row index and column index are required. It has highest priority.Supported
IMAGEproperties:tint-color: Color; image-name: String;Declaration
Swift
open class FUIDataTableCardCollectionViewCell : FUIBaseDrawingCollectionViewCell<FUIDataTableCardView> -
A FUIDataTableCardView is used to track the current and historical development of valuations (= text) based measuring points (e.g. color, viscosity) over time. This helps users to identify unforeseen changes in the development immediately.
Usage
let view = FUIDataTableCardView() view.title.text = "Machine Health Monitoring" view.subtitle.text = "ID 3940151" // set it as needed view.subtitle.textColor = UIColor.preferredFioriColor(forStyle: .criticalLabel) view.status.text = "3hr" view.detailImage = UIImage(named: "") view.data = [[FUIText("Need Attention"), FUIText("Yesterday")], [FUIText("Stable"), FUIText("Jul 5, 2021")], [FUIText("Need Attention"), FUIText("Jul 4, 2021")]]Theming
Supported
TEXTclass paths:fdlFUIDataTableCardView_title {} fdlFUIDataTableCardView_subtitle {} fdlFUIDataTableCardView_status {} fdlFUIDataTableCardView_footnote {} fdlFUIDataTableCardView_textItem {}: TEXT theme for all cells in FUIDataTable. It has lowest priority. fdlFUIDataTableCardView_textItem_row2 {}: TEXT theme for one speciif column in FUIDataTable. # is the column index. It has third priority. fdlFUIDataTableCardView_textItem_column1 {}: TEXT theme for one specific row in FUIDataTable. # is the row index; header is row 0 if it existis. It has second priority. fdlFUIDataTableCardView_textItem_row2_column1{}: TEXT theme for one specific cell in FUIDataTable. Row index and column index are required. It has highest priority.Supported
TEXTproperties:font-color: Color; font-style: UIFontTextStyle; text-line-clamp: Integer; text-align: NSTextAlignment;Supported
IMAGEclass paths:fdlFUIDataTableCardView_imageItem {}: IMAGE theme for all cells in FUIDataTable. It has lowest priority. fdlFUIDataTableCardView_imageItem_column# {}: IMAGE theme for one speciif column in FUIDataTable. # is the column index. It has third priority. fdlFUIDataTableCardView_imageItem_row# {}: IMAGE theme for one specific row in FUIDataTable. # is the row index; header is row 0 if it existis. It has second priority. fdlFUIDataTableCardView_imageItem_row#_column# {}: IMAGE theme for one specific cell in FUIDataTable. Row index and column index are required. It has highest priority.Supported
IMAGEproperties:
See moretint-color: Color; image-name: String;Declaration
Swift
public class FUIDataTableCardView : FUICardBaseView, FUISubtitleMultiLineComponent, FUIFootnoteComponent, FUIDetailImageViewComponent -
A base collection view layout class using section layout manager for generating layout attributes for views in a collection view.
See moreDeclaration
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
See moreprepare()for calculating frames for views in collection view.Declaration
Swift
open class FUISectionLayoutManager : NSObject -
Declaration
Swift
public class FUIBaseDrawingCalendarItemCollectionViewCell<InnerView> : FUIBaseCalendarItemCollectionViewCell, FUIStyleByStringAttributes, InnerViewContainer where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIStyleByStringAttributes -
Gridline properties for an Axis.
See moreDeclaration
Swift
public class FUIChartGridlineAttributes : FUIChartLineAttributes -
Style definition for the chartView. Gives access to the chart theming.
See moreDeclaration
Swift
public class FUIChartStyle : Equatable -
The default implementation of the
See moreFUITintAttributesProviderwithFUIControlStateas theTintStatetype.Declaration
Swift
open class FUIControlStateTintAttributesProvider : FUITintAttributesProvider -
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 isinternalto the SDK.Developers should generally not initialize
FUIResizingCollectionViewdirectly. Instead, instances of the class are typically accessed through theFUITableViewCollectionSectionAPI’s.Important
Resizing behavior will only be executed, if thesizeChangeHandleris 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 moreDeclaration
Swift
public class ObservableArray<Element> : Sequence, ObservableObject where Element : ObservableObject, Element : Hashable, Element : Identifiableextension ObservableArray: Collectionextension ObservableArray: RandomAccessCollection -
FUIBarButtonItemis an enhancedUIBarButtonItemto provide a way to specify the image to be displayed based on the state whentitleisnilor empty.For now, only normal and disabled states are used.
See moreFUIBarButtonItemalso provides a few convenienceinit()s to return a newly initialized SAPFiori StyleUIBarButtonItem. It has the SAPFiori styles, font & color for title and icon,.quaternaryFillbackground color for.highlightedstate, and a minimum 44x44 touch area.Declaration
Swift
open class FUIBarButtonItem : UIBarButtonItem -
A
See moreUITableViewHeaderFooterViewsubclass, which supports top and bottom padding and separators.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 moreDeclaration
Swift
open class FUIInlineValidationDrawingTableViewCell<InnerView> : FUIBaseDrawingTableViewCell<InnerView>, InnerViewContainerEventHandling, FUIInlineValidation where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIStyleByStringAttributes -
See moreUIViewsubclass to draw text and glygh image using TextKit apis. Typically not used by developer.Declaration
Swift
public class FUITextKitView : UIView, PrepareForReuse, FUIContentCopyable -
Undocumented
See moreDeclaration
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
titleandborderwithsetAttribute(attribute, for:). Currently.normal,.selectedand.disabledare supported.let attribute = FUISegmentAttribute(textColor: .red, borderColor: .blue) dimensionSelector.setAttribute(attribute: attribute, for: .selected)Theming
See morefdlFUIDimensionSelector { 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; }Declaration
Swift
open class FUIDimensionSelector : UIView -
Undocumented
See moreDeclaration
Swift
public class FUILabelItem : FUIDrawingView -
The
FUITableViewCollectionSectioncontrol is designed to be used, when a section in aUITableViewshould be dedicated to displaying aUICollectionView, and, the height of that section should adjust to fit its contents.
The collection section produces a single
FUICollectionViewTableViewCell, which refreshes its height, after its subviewFUICollectionViewcalculates the sizes of its subviewUICollectionViewCellitems.A developer uses the
FUITableViewCollectionSection, by assigning a data source (/and delegate) to itscollectionView: FUICollectionViewproperty; then, he or she should supply itscollectionViewTableViewCellproperty to aUITableViewDataSource.tableView(_:cellForRowAt:)implementation.Important
A developer should retain a strong reference to aFUITableViewCollectionSection.## Usage
See morelet 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: // ... } }Declaration
Swift
@available(*, deprecated, message: "Use FUICollectionViewTableViewCell instead.") open class FUITableViewCollectionSection -
The reusable UI component implemented as a
UICollectionViewCellto allow users to enter notes.
The cell height is automatically adjusted to allow all of the content to be displayed. However, the cell height is also limited to the height of the screen above the soft keyboard height.
Usage
The following is an example of usage in an application with
UIViewControllerandUICollectionViewDataSource:override func viewDidLoad() { super.viewDidLoad() self.collectionView.register(FUINoteCollectionViewCell.self, forCellReuseIdentifier: FUINoteCollectionViewCell.reuseIdentifier) } override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UITableViewCell { let cell = self.collectionView.dequeueReusableCell(withReuseIdentifier: FUINoteCollectionViewCell.reuseIdentifier, for: indexPath) as! FUINoteCollectionViewCell cell.onChangeHandler = { [unowned self] newValue in self.noteText = newValue } cell.placeholder.text = "Enter Description" cell.value = noteText cell.isTrackingLiveChanges = true return cell }Theming
Supported
TEXTclass paths:fdlFUINoteFormCell_valueText {} fdlFUINoteFormCell_placeholder {}Supported
TEXTproperties:font-color: Color; font-style: UIFontTextStyle;Supported
TINTABLEclass paths:fdlFUIKeyValueFormCell_valueText {}Supported
TINTABLEproperties:
See moretint-color { -disabled }: Color; font-style { -disabled }: UIFontTextStyle;Declaration
Swift
@IBDesignable open class FUINoteCollectionViewCell : FUIInlineValidationDrawingCollectionViewCell<FUINoteFormCellContentView> -
The reusable UI component implemented as a
UICollectionViewCellto display or edit a textfield.The developer should set the following properties on the cell in their implementation of the
UITableViewDataSourcecellForRow(at:)function:keyName: The key name of the property.value: The value of the property.
And, an
onChangeHandler:onChangeHandler: a handler closure that is invoked on changes to the value.
Optionally, the developer may provide
isEditable: Indicates whether the cell’s value may be modified. The default istrue.isStacked: A Boolean value to determine whether the cell should use a stacked or linear layout. If the device’s accessibility settings font size is increased, the cell will force a stacked layout. By default, this property is set totrue.maxKeyWidth: The maximum width of the key with a linear layout. By default, the width is 115 for compact and 160 for regular. The set value must meet the minimum default threshold.alternativeInputButton: AnFUIButtonthat manages an alternative method to fill thetextField.isAlternativeInputEnabled: ABoolthat shows or hides thealternativeInputButton. This button will indicate whetherisAlternativeInputEnabledandisEditablearetrue.
Color settings:
Manage the color of the control by programmatically setting the
textColorandtintColor.The following is an example of usage in an application with
UIViewControllerandUICollectionViewDataSource:override func viewDidLoad() { super.viewDidLoad() self.collectionView.register(FUITextFieldCollectionViewCell.self, forCellReuseIdentifier: FUITextFieldCollectionViewCell.reuseIdentifier) } override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: FUITextFieldCollectionViewCell.reuseIdentifier, for: indexPath) as! FUITextFieldCollectionViewCell cell.keyName = "Editable" cell.value = myObject.productName // MARK: implement onChangeHandler cell.onChangeHandler = { newValue in myObject.productName = newValue } // MARK: Implement alternative input, i.e. use OCR to capture input cell.isAlternativeInputEnabled = true let inputImage = FUIIconLibrary.system.camera cell.alternativeInputButton.setImage(inputImage.withRenderingMode(.alwaysTemplate), for: .normal) cell.alternativeInputButton.didSelectHandler = { [weak self, weak cell] (button) in //Import SAPML to use OCR capability let textRecController = FUITextRecognitionViewController() textRecController.recognitionView.observationHandler = { [unowned textRecController] observations in let filteredObservations = <#filter out unwanted text#> textRecController.recognitionView.showTexts(for: filteredObservations) let areObservationsValid = <#filteredObservations meets desired criteria#> if areObservationsValid { DispatchQueue.main.async { cell?.value = filteredObservations.map { $0.value }.joined(separator:" ") } return true } return false } textRecController.onClose = { self?.dismiss(animated: true) } self?.present(UINavigationController(rootViewController: textRecController), animated: true) } return cell }## Theming
nuiClass:fdlFUITextFieldFormCell {}Supported
TEXTclass paths:fdlFUITextFieldFormCell_keyText {} fdlFUITextFieldFormCell_valueText {}Supported
TEXTproperties:font-color: Color; placeholder-color: Color; font-style: UIFontTextStyle;Supported
BUTTONclass paths:fdlFUITextFieldFormCell_alternativeInputButton {}Supported
BUTTONproperties:
See morebackground-color: Color; font-color: Color;Declaration
Swift
open class FUITextFieldCollectionViewCell : FUIInlineValidationDrawingCollectionViewCell<FUITextFieldContentView>, FUIFormCell -
UITableViewDiffableDataSource subclass to support editing for the cells in table view.
See moreDeclaration
Swift
open class FUIEditableTableViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType> : UITableViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType> where SectionIdentifierType : Hashable, ItemIdentifierType : Hashable -
This class is an implementation of
FUIAttachmentActionto allow users to choose items usingPHPickerViewControllerfrom the Photo Library as attachments inFUIAttachmentsFormView.The implementation uses a
See morePHPickerViewControllerto let user choose items from Photo Library.Declaration
Swift
@available(iOS 14.0, *) open class FUIAddPhotoLibraryItemsAttachmentAction : FUIAttachmentActionextension FUIAddPhotoLibraryItemsAttachmentAction: PHPickerViewControllerDelegate -
This class is an implementation of
FUIAttachmentActionto allow user to choose a file usingUIDocumentPickerViewControlleras an attachment inFUIAttachmentsFormView.If the application wants to have its
Documentdirectory accessible by theUIDocumentPickerViewController, 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
See moreFUIDocumentPickerAttachmentActionDelegateis 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.Declaration
Swift
open class FUIDocumentPickerAttachmentAction : NSObject, FUIAttachmentActionextension FUIDocumentPickerAttachmentAction: UIDocumentPickerDelegate -
Base inner view for
See moreFUIButtonCollectionViewCell.Declaration
Swift
open class FUIButtonFormView : FUIBaseDrawingView -
The content view of a form cell.
See moreDeclaration
Swift
open class FUIFormCellContentView<ValueView, T, Text> : FUITintableDrawingView<T> where ValueView : UIView, ValueView : Initializable, T : Defaultable, T : Enableable, T : Hashable, Text : FUITextProtocol, Text : Initializable -
When
FUIListPickerCollectionViewCells are to be used in an application, the application’s implementation ofUICollectionViewControllerthat hosts theseFUIListPickerCollectionViewCells must be a subclass of thisFUIFormCollectionViewController.FUIFormCollectionViewControllerhides all the complexity and interactions for handlingFUIListPickerCollectionViewCell.The application’s implementation of the
UICollectionViewControllerneeds to only implement the following functions:
See moreclass FormCollectionViewCellTestTVC: UICollectionViewController { override func viewDidLoad() { // MUST: Call viewDidLoad function of super class. super.viewDidLoad() // Register FUIFormCells that will be used self.collectionView.register(FUIListPickerCollectionViewCell.self, forCellWithReuseIdentifier: FUIListPickerCollectionViewCell.reuseIdentifier) ... } override func numberOfSections(in collectionView: UICollectionView) -> Int { // Return how many sections are in the collection return ... } override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { // Return number of items in each section return ... } override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUIListPickerCollectionViewCell.reuseIdentifier, for: indexPath) as! FUIListPickerCollectionViewCell cell.keyName = "Pick One" cell.isEnabled = true // MARK: implement onChangeHandler cell.onChangeHandler = { newValue in myObject.title = newValue } return cell }Declaration
Swift
open class FUIFormCollectionViewController : UICollectionViewController -
Undocumented
See moreDeclaration
Swift
open class FUIFilterFormView : FUIFormCellContentView<FUIFilterValueView, FUIControlState, FUIMultiLineText>, FUITitleMultiLineComponent, FUIPropertyFormCell -
Undocumented
See moreDeclaration
Swift
public class FUIFilterValueView : UIControl, Initializable, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout -
Undocumented
See moreDeclaration
Swift
open class FUIInlineValidationDrawingCollectionViewCell<InnerView> : FUIBaseDrawingCollectionViewCell<InnerView>, InnerViewContainerEventHandling, FUIInlineValidation where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIStyleByStringAttributes -
Undocumented
See moreDeclaration
Swift
open class FUIInlineValidationUIControlTintTableViewCell : FUIInlineValidationTableViewCell, FUIStyleByTintAttributes -
Base inner view to display a key-value pair property for
FUIListPickerCollectionViewCell.Please refer to the
See moreFUIListPickerCollectionViewCelldocumentation for details.Declaration
Swift
public class FUIListPickerFormView : FUIDrawingView, FUITitleMultiLineComponent, FUIValueComponent -
Base view for map snapshot form cell. Typically not used directly by developer.
See moreDeclaration
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
See morelet 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 snapshotFormCellDeclaration
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
See moreFUINoteFormCell.Declaration
Swift
open class FUINoteFormCellContentView : FUIFormCellContentView<FUITextView, FUIControlState, FUIText>, FUITitleComponent, FUIValueComponent, FUIPlaceholderComponent, FUISubtitleComponent, UITextViewDelegate -
FUIOrderPickerFormCellis aUITableViewCellsubclass, 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.isAtLeastOneSelected = false cell.isContentCopyable = false## Theming
Supported
TEXTclass paths:fdlFUIOrderPickerFormCell_title fdlFUIOrderPickerFormItemCell_title {} fdlFUIOrderPickerFormItemCell_subtitle {}Supported
TEXTproperties:font-color: Color; font-style: UIFontTextStyle;Supported
IMAGEclass paths:fdlFUIOrderPickerFormItemCell_leadingImageView {}Supported
IMAGEproperties:image-name: UIImage; font-style: UIFontTextStyle; tint-color: UIColor;See Theming support in
See moreFUIOrderPickerFormViewandFUIOrderPickerFormItemViewDeclaration
Swift
public class FUIOrderPickerFormCell : FUIBaseDrawingTableViewCell<FUIOrderPickerFormView>, FUIContentCopyable, FUITableAndCollectionCellUpdate -
The table view cell in
FUIOrderPickerFormCellTheming
Supported
TEXTclass paths:fdlFUIOrderPickerFormItemView_title {} fdlFUIOrderPickerFormItemView_subtitle {}Supported
TEXTproperties:font-color: Color; font-style: UIFontTextStyle;Supported
IMAGEclass paths:fdlFUIOrderPickerFormItemView_leadingImageView {}Supported
IMAGEproperties:
See moreimage-name: UIImage; font-style: UIFontTextStyle; tint-color: UIColor;Declaration
Swift
public class FUIOrderPickerFormItemCell : FUIBaseDrawingTableViewCell<FUIOrderPickerFormItemView>, FUIContentCopyable -
The content view of
See moreFUIOrderPickerFormItemCell. Standard Fiori control for rendering business object data.Declaration
Swift
public class FUIOrderPickerFormItemView : FUITintableDrawingView<FUIControlState>, FUITitleMultiLineComponent, FUISubtitleMultiLineComponent, FUILeadingImageViewComponent, FUIContentCopyable -
The content view of
See moreFUIOrderPickerFormCell. Standard Fiori control for rendering business object data.Declaration
Swift
public class FUIOrderPickerFormView : FUITintableDrawingView<FUIControlState>, FUITitleComponent, FUIContentCopyable, UITableViewDataSource, UITableViewDelegate -
A slider form cell displays a continuous range of values along a track where the user slides a handle using their thumb between the lower (minimum) value of the range and the upper (maximum value) of the range. The custom range slider supports both a single thumb or double thumb.
Note: In voiceover mode, and when focusing on the thumb, the user can swipe up or down to change the value or double tap and hold to continuously change the value.
See moreDeclaration
Swift
open class FUIRangeSlider : UIControl -
The content view of the
See moreFUIRangeSliderFormCellorFUIRangeSliderCollectionViewCell.Declaration
Swift
open class FUIRangeSliderContentView : FUIFormCellContentView<FUITextField, FUIControlState, FUIText>, FUITitleComponent, FUISubtitleComponent, UITextFieldDelegate -
FUIRatingControluses 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
styleproperty 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. TheFUIRatingControlwill sendUIControl.Event.valueChangedevent when rating changed.Theming
Supported
FUIRatingControlclass paths:fdlFUIRatingControlSupported
RatingControlproperties:
See moreon-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;Declaration
Swift
open class FUIRatingControl : UIControl, Initializable -
This is the content view of the
FUIRatingControlFormCell.This view includes a
See moreFUITextKitViewfor title, aFUIRatingControlfor the rating control, and anotherFUITextKitViewfor subtitle. Whensubtitleis not nil, the title will not be displayed.Declaration
Swift
open class FUIRatingControlContentView : FUIFormCellContentView<FUIRatingControl, FUIControlState, FUIText>, FUITitleComponent, FUIPropertyFormCell, FUISubtitleComponent -
The reusable UI component implemented as an
UITableViewCellwhich includes aFUIRatingControlto allow user select a rating.This form cell uses
FUIRatingControlContentViewas its content view.FUIRatingControlContentViewincludes aFUITextKitViewfor hosting thekeyNameproperty, aFUIRatingControlfor the rating control, and anotherFUITextKitViewfor subtitle.When the
textinsubtitleis not nil, the title will not be displayed.Control Styles
The available style for the
FUIRatingControlcan be set by developer toeditable,editableDisabled,standard, oraccented.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
TEXTclass paths:fdlFUIRatingControlFormCell_title {}Supported
TEXTproperties:font-color: Color; font-style: UIFontTextStyle;Supported
FUIRatingControlclass path:fdlFUIRatingControlFormCell_ratingControlSupported
RatingControlproperties:
See moreon-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;Declaration
Swift
open class FUIRatingControlFormCell : FUIInlineValidationDrawingTableViewCell<FUIRatingControlContentView> -
A
UICollectionViewCellsubclass that allows a user to view or select from a list of strings using a Fiori-styled segmented control.The
valueproperty of the cell is equal to theselectedSegmentIndexin the segmented control.Specify segment heights by setting the
segmentHeightAPI. By default this is set to nil, which means a segment will adjust its height to fit the content.Color setting:
Setting the text color of buttons in the cell for a state using the
setButtonAttributes(_:for:)API. The supported states are:disabled,normal, andselected.let attributes = FUISegmentedControlButtonAttributes() attributes.titleAttributes = ... attributes.borderColor = ... cell.setButtonAttributes(attributes, for: .normal)Code Usage
// Optionally, create an array of value options to localized string mappings. let buttonTitles: [[String: String]] = [["LO": "Low"], ["MED": "Medium"], ["HI": "High"]] // Register `FUISegmentedControlCollectionViewCell` in the `viewDidLoad()` method in the controller. override func viewDidLoad() { super.viewDidLoad() self.collectionView.register(FUISegmentedControlCollectionViewCell.self, forCellReuseIdentifier: FUISegmentedControlCollectionViewCell.reuseIdentifier) } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FUISegmentedControlCollectionViewCell.reuseIdentifier, for: indexPath) as! FUISegmentedControlCollectionViewCell cell.valueOptions = buttonTitles.flatMap { $0.map { $0.value } } cell.keyName = "Priority" cell.value = myObject.priority // String value in the valid options set: ["LO", "MED", "HI"] // MARK: implement `onChangeHandler`. cell.onChangeHandler = { newValue in myObject.priority = buttonTitles[newValue].first!.key // lookup valid String value, from the buttonTitles array } return cell }Theming
Supported style classes
See morefdlFUISegmentedControlCollectionViewCell fdlFUISegmentedControlCollectionViewCell_keyLabelDeclaration
Swift
open class FUISegmentedControlCollectionViewCell : FUIInlineValidationDrawingCollectionViewCell<FUISegmentedControlFormView>, FUIFormCell -
A base
FUISegmentedControlFormViewthat allows a user to view or select from a list of strings using a Fiori-styled segmented control.The
valueproperty of the cell is equal to theselectedSegmentIndexin the segmented control.Specify the height for segments by setting the
segmentHeightAPI. By default it is set to nil, which means the segment will adjust its height to fit the content.Color setting:
Setting the text color of buttons in the cell for a state using the
setButtonAttributes(_:for:)API. The supported states are:disabled,normal, andselected.let attributes = FUISegmentedControlButtonAttributes() attributes.titleAttributes = ... attributes.borderColor = ... self.setButtonAttributes(attributes, for: .normal)Code Usage
// Optionally, create an array of value option to localized string mappings let buttonTitles: [[String: String]] = [["LO": "Low"], ["MED": "Medium"], ["HI": "High"]] let view = FUISegmentedControlFormView() view.valueOptions = buttonTitles.flatMap { $0.map { $0.value } } view.keyName = "Priority" view.value = myObject.priority // String value in the valid options set: ["LO", "MED", "HI"] // MARK: implement `onChangeHandler`. view.onChangeHandler = { newValue in myObject.priority = buttonTitles[newValue].first!.key // lookup valid String value, from the buttonTitles array }Theming
Supported style classes
See morefdlFUISegmentedControlFormView fdlFUISegmentedControlFormView_keyLabelDeclaration
Swift
open class FUISegmentedControlFormView : FUIBaseDrawingViewextension FUISegmentedControlFormView: UICollectionViewDataSource, UICollectionViewDelegateFlowLayout -
The content view of a
FUIInlineSignatureFormCell.Theming
Supported
FUIInlineSignatureFormViewclass path:fdlFUIInlineSignatureFormViewSupported
FUIInlineSignatureFormViewproperties:stroke-width: (Number) stroke-color: (Color) drawing-area-background-color: (Color) xmark-color: (Color) signature-line-color: (Color)Supported
Textclass path:fdlFUIInlineSignatureFormView_title fdlFUIInlineSignatureFormView_startActionTitle fdlFUIInlineSignatureFormView_restartActionTitle fdlFUIInlineSignatureFormView_cancelActionTitle fdlFUIInlineSignatureFormView_clearActionTitle fdlFUIInlineSignatureFormView_saveActionTitle fdlFUIInlineSignatureFormView_watermarkTextSupported
Textproperties:
See morefont-color: Color; font-style: UIFontTextStyle;Declaration
Swift
public class FUIInlineSignatureFormView : FUIBaseDrawingView, FUISignatureDrawingPadComponent, FUITitleComponent, FUIStartActionComponent, FUIRestartActionComponent, FUICancelActionComponent, FUIClearActionComponent, FUISaveActionComponent, FUIWatermarkTextComponent -
The content view of a
See moreFUISliderCollectionViewCell.Declaration
Swift
open class FUISliderContentView : FUIFormCellContentView<FUITextField, FUIControlState, FUIText>, FUITitleComponent, FUIValueComponent -
The content view of an
See moreFUIStepperFormCell.Declaration
Swift
open class FUIStepperView : FUIFormCellContentView<FUITextField, FUIControlState, FUIText>, FUITitleComponent, FUIValueComponent, FUISubtitleComponent, UITextFieldDelegate -
The content view of a
See moreFUISwitchFormCell.Declaration
Swift
open class FUISwitchFormView : FUIFormCellContentView<UISwitch, FUISwitchControlState, FUIMultiLineText>, FUISwitchComponent, FUITitleMultiLineComponent -
This is an implementation of
FUIFormattedStringEditingon top of the regular iOSNumberFormatter.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 = formatterThe text field will display “1.234lbs” when user types “1.234”.
Declaration
Swift
open class FUINumberFormatter : NumberFormatter, FUIFormattedStringEditing -
A
FUIFormattedStringEditingimplementation 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 moreDeclaration
Swift
open class FUIPhoneNumberFormatter : FUIFormattedStringEditing -
The content view of an
See moreFUITextFieldFormCell.Declaration
Swift
open class FUITextFieldContentView : FUIFormCellContentView<FUITextField, FUIControlState, FUIText>, FUITitleComponent, FUIValueComponent, FUIPlaceholderComponent, FUISubtitleComponent, FUIPropertyFormCell, UITextFieldDelegate -
The
FUIGridRowSummaryItemis a subclass ofFUIGridRowTextItemfor representing a summary item inFUIGridTableViewCell.FUIGridRowSummaryItemis different fromFUIGridRowTextItemin terms of style.Theming
Supported style classes
See morefdlFUIGridRowSummaryItem_labelDeclaration
Swift
open class FUIGridRowSummaryItem : FUIGridRowTextItem -
FUIGridTableViewHeaderFooterViewis a FIori UI component that extendsUITableViewHeaderFooterViewfor showing a list ofFUIGridRowItemcolumn 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-1to 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
FUIGridTableViewHeaderFooterViewis adaptive forregularandcompacthorizontal content modes. It is hidden by design, when incompactmode. 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.
See more// 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!Declaration
Swift
open class FUIGridTableViewHeaderFooterView : FUIBaseTableViewHeaderFooterView, FUIContentCopyable -
FUIGridTableViewSummaryFooteris a Fiori UI component that extendsUITableViewHeaderFooterViewfor showing a list ofFUIGridRowItemcolumn 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-1to 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
FUIGridTableViewSummaryFooteris adaptive forregularandcompacthorizontal content modes. It is hidden by design, when incompactmode. 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.
See more@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) }Declaration
Swift
open class FUICreateGeometryPopOverTableViewController : FUIResizablePopoverContainer, UITableViewDelegate, UITableViewDataSource -
A subclass of
See moreMKPointAnnotationwhich conforms toFUIAnnotationand it is tied to a callout tag showing the name of a route on the map.Declaration
Swift
open class FUICalloutAnnotation : MKPointAnnotation, FUIAnnotation -
FUIEditingGeometryObjecta generic object that specifies the acceptedFUIGeometryType, Representation Type, and Map Type.Variables Available in FUIEditingGeometryObject:
geometry: The geometry associated with the editing objectcachedGeometry: The cached instance of the geometrycachedIndex: 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.
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 -
MKPointAnnotationsubclass 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 moreDeclaration
Swift
open class FUIRoute<LineGeometry, PointGeometry> where LineGeometry : FUIPolyline, PointGeometry : FUIPointextension FUIRoute: Hashable -
A subclass of
FUIMKMapFloorplanViewControllerdesigned to be used with MapKit framework. It adds additional functionality to map floorplan controller to support routes display.Usage
Create a
FUIRouteinstance for each route you want to display. Make sure your route stop geometry type extendsMKPointAnnotationandFUIAnnotation, and route segment geometry type extendsMKPolylineandFUIOverlay.- Implement
FUIMKRoutingMapViewDataSourcemethods.
In the routing floorplan controller
viewDidLoad()set the datasource.self.dataSource = dataSourcefunc numberOfRoutes(in mapView: MKMapView) -> Int { return 1 } func mapView(_ mapView: MKMapView, routeAt index: Int) -> FUIRoute<MKPolyline, MKPointAnnotation> { return fuiRoute }FUIMKRoutingMapViewDelegateprovides more functionalities that you can make your app more powerful.
In the floorplan controller viewDidLoad() set the delegate.
self.delegate = delegateDetermine 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 moreDeclaration
Swift
open class FUIMKRoutingFloorplanViewController : FUIMKMapFloorplanViewController - Implement
-
Base inner view for
FUIMapDetailTagObjectTableViewCell.Declaration
Swift
public class FUIMapDetailTagObjectView : FUIObjectView -
Base container for showing business object information.
Example Initialization and Configuration:
let view = FUICardBaseContainer<Header: UIView, InnerView: Drawing>() view.primaryAction.isHidden = false view.secondaryAction.isHidden = false view.primaryAction.setTitle(<#T##String?#>, for: <#T##UIControlState#>) view.secondaryAction.setTitle(<#T##String?#>, for: <#T##UIControlState#>)Theming
Please refer to
See moreFUIObjectCardViewdocumentation for all supported attributes.Declaration
Swift
open class FUICardBaseContainer<Header, Content> : FUITintableDrawingView<FUIControlState>, InnerViewContainerEventHandling, FUIPrimaryActionComponent & FUISecondaryActionComponent, InnerViewContainerProtocols where Header : FUIBaseFixedMarginsView, Header : FUIBackgroundSchemeSupporting, Header : FUICalculateLayout, Header : FUIStyleByStringAttributes, Content : FUIBaseFixedMarginsView, Content : FUIBackgroundSchemeSupporting, Content : FUICalculateLayout, Content : FUIStyleByStringAttributes -
Base container for showing object actions in footer.
Example Initialization and Configuration:
See morelet view = FUICardFooterView() view.primaryButton.isHidden = false view.primaryAction.setTitle("Primary", for: .normal) view.secondaryAction.isHidden = false view.secondaryAction.setTitle("Secondary", for: .normal)Declaration
Swift
open class FUICardFooterView : FUITintableDrawingView<FUIControlState>, FUIPrimaryActionComponent & FUISecondaryActionComponent -
Base container for showing business object header information.
Example Initialization and Configuration:
let view = FUICardHeaderView() view.detailImageView.image = UIImage(named: "imageName") view.overflowAction.isHidden = false view.title = "Title"Theming
Supported
TEXTclass paths:fdlFUICardHeaderView_title {} fdlFUICardHeaderView_overflowAction {}
Supported
TEXTproperties:font-color: Color; font-style: UIFontTextStyle; text-align: NSTextAlignment;
Supported
IMAGEclass paths:fdlFUICardHeaderView_detailImageView {}
Supported
IMAGEproperties:tint-color: Color;
See moreDeclaration
Swift
open class FUICardHeaderView : FUITintableDrawingView<FUIControlState>, FUICardHeaderViewComponent -
Showing business list card information as inner view for collection view cell.
See moreDeclaration
Swift
open class FUIListCardCollectionViewCell<ItemIdentifier> : FUIBaseDrawingCollectionViewCell<FUIListCardView<ItemIdentifier>> where ItemIdentifier : Hashable, ItemIdentifier : Identifiable -
Base inner view showing business object information for
FUIListCardView.Example Initialization and Configuration:
let view = FUIListCardView<<#ItemIdentifier: Hashable & Identifiable#>>() view.register(<#T##cellClass: AnyClass?##AnyClass?#>, forCellReuseIdentifier: <#T##String#>) view.cellProvider = ((UITableView, IndexPath, ItemIdentifier) -> UITableViewCell) view.setItems(<#T##[ItemIdentifier]#>) view.cellTappedHandler = ...Declaration
Swift
open class FUIListCardContentView<ItemIdentifier> : FUIBaseDrawingView, FUIListCardComponent, UITableViewDelegate where ItemIdentifier : Hashable, ItemIdentifier : Identifiable -
Showing business list card information as inner view for table view cell.
See moreDeclaration
Swift
open class FUIListCardTableViewCell<ItemIdentifier> : FUIBaseDrawingTableViewCell<FUIListCardView<ItemIdentifier>> where ItemIdentifier : Hashable, ItemIdentifier : Identifiable -
Base container for showing business object header information.
Example Initialization and Configuration:
let view = FUIListCardView<ItemIdentifier>() view.detailImageView.image = UIImage(named: "imageName") view.title = "Title" view.primaryButton.isHidden = false view.primaryAction.setTitle("Primary", for: .normal) view.secondaryAction.isHidden = false view.secondaryAction.setTitle("Secondary", for: .normal) view.overflowAction.isHidden = false view.overflowAction.setImage(UIImage(systemName: "ellipsis"), for: .normal) view.register(cellClass: AnyClass?, forCellReuseIdentifier: "reuseIdentifier") view.cellProvider = ((UITableView, IndexPath, ItemIdentifier) -> UITableViewCell) view.setItems([ItemIdentifier]) view.cellTappedHandler = ...Theming
Supported
TEXTclass paths:fdlFUICardHeaderView_title {} fdlFUIListCardView_overflowAction {} fdlFUIListCardView_primaryAction {} fdlFUIListCardView_secondaryAction {}
Supported
TEXTproperties:font-color: Color; font-style: UIFontTextStyle; text-align: NSTextAlignment;
Supported
IMAGEclass paths:fdlFUIListCardView_detailImageView {}
Supported
IMAGEproperties:tint-color: Color;
See moreDeclaration
Swift
open class FUIListCardView<ItemIdentifier> : FUICardBaseContainer<FUICardHeaderView, FUIListCardContentView<ItemIdentifier>>, FUICardHeaderViewComponent where ItemIdentifier : Hashable, ItemIdentifier : Identifiableextension FUIListCardView: FUIListCardComponent -
FUIObjectCardis a collection view UI component which extendsFUIBaseAccessoryDrawingCollectionViewCellfor showing rich business information for an object in a card format, including tags and rating. TheFUIObjectCardcan also be configured to use single action button.Initialization and Configuration:
To use
FUIObjectCard, it should be dequeued from aUICollectionViewand returned in its data source method.Example of setting an
FUIObjectCardby implementingcellForItemWithin 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 = .centerTags 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 (
xmeans 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,.footnoteand.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
See moreFUIObjectCardContentViewdocumentation for all supported attributes.Declaration
Swift
open class FUIObjectCard : FUIBaseAccessoryDrawingCollectionViewCell<FUIObjectCardContentView>, InnerViewContainerEventHandling, FUIContentCopyableView -
Showing business object card information as inner view for collection view cell.
See moreDeclaration
Swift
open class FUIObjectCardCollectionViewCell : FUIBaseDrawingCollectionViewCell<FUIObjectCardView> -
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
TEXTclass paths:fdlFUIObjectCardContentView_title {} fdlFUIObjectCardContentView_subtitle {} fdlFUIObjectCardContentView_footnote {} fdlFUIObjectCardContentView_status {} fdlFUIObjectCardContentView_body {} fdlFUIObjectCardContentView_overflowAction {}
Supported
TEXTproperties:font-color: Color; font-style: UIFontTextStyle; text-align: NSTextAlignment;
Supported
IMAGEclass paths:fdlFUIObjectCardContentView_detailImageView {}
Supported
IMAGEproperties:tint-color: Color;
See moreDeclaration
Swift
open class FUIObjectCardContentView : FUIObjectViewBase, FUIObjectCardComponent -
Showing business object card information as inner view for table view cell.
See moreDeclaration
Swift
open class FUIObjectCardTableViewCell : FUIBaseDrawingTableViewCell<FUIObjectCardView> -
Showing business object card information.
Example Initialization and Configuration:
let view = FUIObjectCardView() view.primaryButton.isHidden = false view.primaryAction.setTitle("Primary", for: .normal) view.secondaryAction.isHidden = false view.secondaryAction.setTitle("Secondary", for: .normal) view.overflowAction.isHidden = false view.overflowAction.setImage(UIImage(systemName: "ellipsis"), for: .normal) view.title.text = "Business Object Title" view.subtitle.text = "Business Object Subtitle" view.footnote.text = "Business Object Footnote" view.status.text = "Business Object Status"Theming
Supported class paths:
fdlFUIObjectCardView {} fdlFUIObjectCardView_title {} fdlFUIObjectCardView_subtitle {} fdlFUIObjectCardView_footnote {} fdlFUIObjectCardView_status {} fdlFUIObjectCardView_body {} fdlFUIObjectCardView_primaryAction {} fdlFUIObjectCardView_secondaryAction {} fdlFUIObjectCardView_overflowAction {}
See moreDeclaration
Swift
open class FUIObjectCardView : FUICardBaseContainer<FUIBaseDrawingView, FUIObjectCardContentView>, FUIObjectCardViewComponent -
Typically not used by developer
See moreDeclaration
Swift
open class FUIBaseAccessoryDrawingCollectionViewCell<InnerView> : FUIBaseDrawingCollectionViewCell<InnerView> where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIReactingToAccessory, InnerView : FUIStyleByStringAttributes -
Typically not used by developer
See moreDeclaration
Swift
open class FUITableViewAccessoryDrawingCollectionViewCell<InnerView> : FUIBaseAccessoryDrawingCollectionViewCell<InnerView> where InnerView : FUIBaseFixedMarginsView, InnerView : FUIBackgroundSchemeSupporting, InnerView : FUICalculateLayout, InnerView : FUIReactingToAccessory, InnerView : FUIStyleByStringAttributes -
A base class that is the
See moreFUIBaseDrawingTableViewCellsubclass for presenting an object view inside a table view cell, which defines common layout elements shared byFUIObjectTableViewCellandFUIHierarchyItemTableViewCell.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 moreDeclaration
Swift
open class FUIObjectViewBase : FUITintableDrawingView<FUIControlState>, FUIReactingToAccessory, FUIObjectBaseDrawing, FUIContentCopyable -
A
UISegmentedControlsubclass 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 = .darkConstantTheming
See morefdlFUISegmentControl { 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) }Declaration
Swift
open class FUISegmentControl : UISegmentedControl, FUIAttributedStringDrawing -
FUITimelineNowIndicatorCellis aUITableViewCellsubclass, 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 ###
SingleLineSeparator Between Timeline Items in the Table The default table viewseparatorStyleis.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, setseparatorStyletononein theTabelViewControllerclassoverride 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
See morefdlFUITimelineNowIndicatorCell fdlFUITimelineNowIndicatorCell_nodeImageView fdlFUITimelineNowIndicatorCell_indicatorLineDeclaration
Swift
open class FUITimelineNowIndicatorCell : NibDesignableFUIBaseTableViewCell, FUIStyleSheetAttributesApplying -
Section layout manager subclass specifically designed for
See moreFUIStandardAutoSizingColumnFlowLayoutwhich layout the cells in columns with the same width.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 theThemeManagershould happen at the beginning of the application lifecycle.Note
AppDelegate.didFinishLaunching(withOptions...)is the recommended location.Example Usage
See more// 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)Declaration
Swift
public class FUIThemeManager -
The FUIBaseCalendarItemCollectionViewCell class defines the attributes and behavior of the cells that appear in calendar view objects.
See moreDeclaration
Swift
open class FUIBaseCalendarItemCollectionViewCell : UICollectionViewCell