FUIContactView

Base view of FUIContactCollectionViewCell. Standard Fiori control for rendering contact data.

Example Initialization and Configuration

let view = FUIContactView()
view.detailImageView.image = UIImage(named: "name")
view.headlineText = "Edgar Smith"
view.subheadlineText = "Lorem ipsum datil es iosin Lotios nsiqok"
view.activityControl.addActivities([.phone, .email]))
view.activityControl.maxVisibleItems = 4
view.onActivitySelectedHandler = { [weak self] activityItem in
}

Theming

Supported FUIContactView class paths:

fdlFUIContactView {}

Supported FUIContactView attributes: background-color (Color)

Supported Text class paths:

fdlFUIContactView_headlineLabel {}
fdlFUIContactView_subheadlineLabel {}
fdlFUIContactView_descriptionLabel {}

Supported Text attributes:

font-color (Color)
font-name (FontName)
font-style (UIFontTextStyle)
font-size (Number)
text-align (TextAlign)
text-line-clamp (Integer)

Supported ImageView class paths:

fdlFUIContactView_detailImageView {}

Supported ImageView attributes:

image-name (Image)
tint-color (Color)
  • The UILabel holds headline text.

    Declaration

    Swift

    @objc
    @MainActor
    public private(set) lazy var headlineLabel: FUILabel { get set }
  • The UILabel holds subheadline text.

    Declaration

    Swift

    @objc
    @MainActor
    public private(set) lazy var subheadlineLabel: FUILabel { get set }
  • The UILabel holds description text.

    Declaration

    Swift

    @objc
    @MainActor
    public private(set) lazy var descriptionLabel: FUILabel { get set }
  • Property to preserve detailImageView spacing. When it’s set to true, spacing is preserved for detailImageView even when there’s no image added to the image view.

    Declaration

    Swift

    @MainActor
    public var preserveDetailImageSpacing: Bool { get set }
  • Text of the headline label.

    Declaration

    Swift

    @MainActor
    public var headlineText: String? { get set }
  • Text of the subheadline label.

    Declaration

    Swift

    @MainActor
    public var subheadlineText: String? { get set }
  • Text of the description label.

    Declaration

    Swift

    @MainActor
    public var descriptionText: String? { get set }
  • Image of FUIContactView.

    Declaration

    Swift

    @MainActor
    public var detailImage: UIImage? { get set }
  • The FUIImageView holds a detail image.

    Declaration

    Swift

    @objc
    @MainActor
    public private(set) lazy var detailImageView: FUIImageView { get set }
  • Dimensions of detailImageView. These should be within the range of 32x32 to 60x60. The default is 45x45.

    Declaration

    Swift

    @MainActor
    public var detailImageViewSize: CGSize { get set }
  • Distribution of left and right content columns in .regular horizontal content mode. The default value is 0.5.

    Declaration

    Swift

    @MainActor
    public var splitPercent: CGFloat { get set }
  • Optional handler closure for ActivityItem selection.

     cell.onActivitySelectedHandler = { [weak contact] activityItem in
         switch activityItem {
            case ActivityItem.phone:
                let _ = contact?.call()
            case ActivityItem.message:
                let _ = contact?.sendMessage()
            case ActivityItem.videoCall:
                let _ = contact?.video()
            default:
                break
        }
    }
    

    Declaration

    Swift

    @MainActor
    open var onActivitySelectedHandler: ((FUIActivityItem) -> Void)?
  • The FUIActivityControl object used in FUIContactView.

    Declaration

    Swift

    @MainActor
    public lazy var activityControl: FUIActivityControl { get set }
  • This property indicates if the content copyable is enabled or not.

    The default is true.

    Declaration

    Swift

    @MainActor
    open var isContentCopyable: Bool { get set }
  • This protocol provides the method for handling activity action in an activity control component.

    Declaration

    Swift

    @MainActor
    public func activityControl(_ activityControl: FUIActivityControl, didSelectActivity activityItem: FUIActivityItem)
  • :nodoc

    Declaration

    Swift

    @MainActor
    open override func prepareForReuse()