FUIAINoticeView

@MainActor
open class FUIAINoticeView : UIView

FUIAINoticeView is a UIView contains an icon, a message and an action label. It is used by FUIInlineValidationTableViewCell as a Ai notice view appearing at the bottom to show the AI notice message. The application can configure the icon, message, and action label using the API. If these values are not set, the default icon and message will be applied automatically.

Usage

let cell = tableView.dequeueReusableCell(withIdentifier: FUIValuePickerFormCell.reuseIdentifier, for: indexPath) as! FUIValuePickerFormCell
cell.keyName = "Value Picker"
cell.value = valuePicker
cell.valueOptions = ["0", "1", "2", "3", "4", "5", "6"]
cell.showsAINotice = true

/// To customize the icon and label
cell.aiNoticeIcon = UIImage(systemName: "star")
cell.aiNoticeMessage = "Powered by AI. Please note that this is feature with content generated by AI agent."
cell.aiNoticeView.aiNoticeMessage.font = UIFont.preferredFioriFont(forTextStyle: .footnote, isItalic: true)
cell.aiNoticeView.aiNoticeMessage.textColor = .purple
cell.aiNoticeActionLabel?.text = "Click here for more information"
cell.aiNoticeActionLabel?.font = UIFont.preferredFioriFont(forTextStyle: .callout, isItalic: true)
cell.aiNoticeActionLabel?.textColor = UIColor.cyan
cell.aiNoticeAction = onTapAction

tableViewCell = cell

Theming

Supported style classes

fdlFUIAINoticeView
fdlFUIAINoticeView_aiNoticeMessage
fdlFUIAINoticeView_aiNoticeActionLabel
  • Icon image of the FUIAINoticeView. The default value is FUIIconLibrary.actions.ai.

    Declaration

    Swift

    @MainActor
    open var aiNoticeIcon: UIImage? { get set }
  • Undocumented

    Declaration

    Swift

    @MainActor
    open var iconImageView: UIImageView
  • A UIlabel holds the AI notice message.

    Declaration

    Swift

    @MainActor
    open var aiNoticeMessage: FUILabel { get set }
  • A UIlabel holds the AI notice action label.

    Declaration

    Swift

    @MainActor
    open var aiNoticeActionLabel: FUILabel { get set }
  • Boolean value indicating the view is enabled or disabled.

    The default value is true.

    Declaration

    Swift

    @MainActor
    public var isEnabled: Bool { get set }
  • UIStackView for FUIAINoticeView

    Declaration

    Swift

    @MainActor
    open var hStack: UIStackView
  • Action handler when the aiNoticeActionLabel is clicked.

    Declaration

    Swift

    @MainActor
    open var aiNoticeAction: (() -> Void)? { get set }