FUIEmptyStateView

FUIEmptyStateView: conforms to the UIView class and contains SwiftUI component EmptyStateView as a container.

Usage 1: simple

  let emptyView = FUIEmptyStateView()
  emptyView.title.text = "Custom placeholder title"
  emptyView.body.text = "This is a text to describe what you can do when there is no data"
  emptyView.detailImageView.image = UIImage(named: "errorMessage")
  let actionButton = FUIButton()
  // ... configure button style
  // actionButton.setContentHuggingPriority(.defaultHigh, for: .horizontal)
  // actionButton.setContentHuggingPriority(.defaultHigh, for: .vertical)
  emptyStateView.primaryAction = actionButton

Usage 2: customization

  let emptyStateView = FUIEmptyStateView()

  emptyStateView.title.text = ...
  emptyStateView.titleAttributedText = ...

  emptyStateView.body.text = ...
  emptyStateView.bodyAttributedText = ...

  let detailImageView = FUIImageView()
  // ... configure imageView style
  emptyStateView.detailImageView = detailImageView

  let actionButton = FUIButton()
  // ... configure button style
  // actionButton.setContentHuggingPriority(.defaultHigh, for: .horizontal)
  // actionButton.setContentHuggingPriority(.defaultHigh, for: .vertical)
  emptyStateView.primaryAction = actionButton