Class
ListCellLayout
public final class ListCellLayout: NSObject, ComponentLayout
Relationships
Conforms To
ComponentLayout
A protocol to share components (view layouts) across different types.
NSObject
Properties
textColor
public var textColor: UIColor = ColorManager.shared.textBody
tertiaryTextColor
public var tertiaryTextColor: UIColor = ColorManager.shared.tertiaryTextBody
image
public var image: UIImage?
imageTint
public var imageTint: UIColor?
title
public var title: String?
attributedTitle
public var attributedTitle: NSAttributedString?
subtitle
public var subtitle: String?
attributedSubtitle
public var attributedSubtitle: NSAttributedString?
tertiaryText
public var tertiaryText: String?
timeStampText
public var timeStampText: String?
attributedTertiaryText
public var attributedTertiaryText: NSAttributedString?
contentInsets
public var contentInsets: UIEdgeInsets
alignment
public var alignment: UIStackView.Alignment = .top
titleLabel
public private(set) lazy var titleLabel: UILabel
subtitleLabel
public private(set) lazy var subtitleLabel: UILabel
tertiaryLabel
public private(set) lazy var tertiaryLabel: UILabel
rightAccessoryView
public let rightAccessoryView: UIView
Methods
layout(on:)
public func layout(on view: UIView)
configure(image:title:subtitle:tertiaryText:)
public func configure(image: UIImage? = nil, title: String? = nil, subtitle: String? = nil, tertiaryText: String? = nil)
Configures the layout with an optional image and optional text.
Parameters
Name | Type | Description |
---|---|---|
image | UIImage? |
The image to place in the leading image view. |
title | String? |
The title text. |
subtitle | String? |
The subtitle text. |
tertiaryText | String? |
The tertiary text. |
configure(image:title:subtitle:tertiaryText:)
public func configure(
image: UIImage? = nil, title: NSAttributedString? = nil,
subtitle: NSAttributedString? = nil, tertiaryText: NSAttributedString? = nil)
Configures the layout with an optional image and optional attributed text.
Parameters
Name | Type | Description |
---|---|---|
image | UIImage? |
The image to place in the leading image view. |
title | NSAttributedString? |
The title text. |
subtitle | NSAttributedString? |
The subtitle text. |
tertiaryText | NSAttributedString? |
The tertiary text. |
configure(leadingImageViewConfiguration:title:subtitle:tertiaryText:)
public func configure(
leadingImageViewConfiguration: ImageViewConfiguration? = nil, title: String? = nil,
subtitle: String? = nil, tertiaryText: String? = nil)
Configures the layout with an optional image and optional attributed text.
Parameters
Name | Type | Description |
---|---|---|
imageViewConfiguration | The configuration object to config the image view. |
|
title | String? |
The title text. |
subtitle | String? |
The subtitle text. |
tertiaryText | String? |
The tertiary text. |
configure(leadingImageViewConfiguration:title:subtitle:tertiaryText:)
public func configure(
leadingImageViewConfiguration: ImageViewConfiguration? = nil, title: NSAttributedString? = nil,
subtitle: NSAttributedString? = nil, tertiaryText: NSAttributedString? = nil)
Configures the layout with an optional image and optional attributed text.
Parameters
Name | Type | Description |
---|---|---|
imageViewConfiguration | The configuration object to config the image view. |
|
title | NSAttributedString? |
The title text. |
subtitle | NSAttributedString? |
The subtitle text. |
tertiaryText | NSAttributedString? |
The tertiary text. |