FUIAvatarStack
@MainActor
open class FUIAvatarStack : FUITintableDrawingView<FUIControlState>, FUITitleMultiLineComponent
FUIAvatarStack is a container for a group of avatars with .grouped or .horizontal layout. Also a leading or trailing text can be displayed along with the avatars.
Example Initialization and Configuration:
let avatarStack = FUIAvatarStack()
avatarStack.avatars = ["1", UIImage(systemName: "person")!]
avatarStack.avatarsLayout = .grouped
avatarStack.sideLength = 30
avatarStack.title.text = "Description text for avatar stack"
avatarStack.titlePosition = .leading
avatarStack.isCircular = true
avatarStack.avatarsBorderWidth = 1
avatarStack.avatarsBorderColor = UIColor.red
avatarStack.avatarsContentModel = .scaleAspectFit
Theming
Supported Text class paths:
fdlFUIAvatarStack_title {}
Supported Text attributes:
font-color (Color)
font-name (FontName)
font-style (UIFontTextStyle)
font-size (Number)
Supported ImageView class paths:
fdlFUIAvatarStack_avatar_0 {}: Image theme for first image.
fdlFUIAvatarStack_avatar_1 {}: Image theme for second image.
fdlFUIAvatarStack_avatar {}: Image theme for the others.
Supported ImageView attributes:
image-name: String;
tint-color: Color;
font-color: Color;
background-color: Color;
content-mode: ContentMode
-
Position for text in the stack.
See moreleading,trailing,topandbottomare available.Declaration
Swift
public enum TextPosition -
Text layout for title. The default is
.trailing.Declaration
Swift
@MainActor public var titlePosition: TextPosition { get set } -
Layout for avatars. The default is
.grouped.Declaration
Swift
@MainActor public var avatarsLayout: FUIAvatarsView.Layout { get set } -
List of
FUIGlyphImagefor avatar stack.Declaration
Swift
@MainActor public var avatars: [FUIGlyphImage] { get set } -
The maximum number of icons. The default is
nil.Declaration
Swift
@MainActor public var maxCount: Int? { get set } -
Specifies whether the icons are drawn as circular. The default is
true.Declaration
Swift
@MainActor public var isCircular: Bool { get set } -
Side length for icons. The default is
16.Declaration
Swift
@MainActor public var sideLength: CGFloat { get set } -
List of image containers instances.
Declaration
Swift
@MainActor public var avatarsImageViews: [FUIImageView] { get } -
Spacing between icons. The default is
-1.Declaration
Swift
@MainActor public var iconsSpacing: CGFloat { get set } -
Minimum text width. The default is
60.Declaration
Swift
@MainActor public var minimumTextWidth: CGFloat { get set } -
Spacing between text and icons. The default is
6.Declaration
Swift
@MainActor public var textIconsSpacing: CGFloat { get set } -
UIColorfor avatars border color. Default isclear.Declaration
Swift
@MainActor public var avatarsBorderColor: UIColor { get set } -
Dimensions of avatars border width. Default is
0.Declaration
Swift
@MainActor public var avatarsBorderWidth: CGFloat { get set } -
Content mode for avatars. Default is
.scaleAspectFit.Declaration
Swift
@MainActor public var avatarsContentModel: UIView.ContentMode? { get set } -
Multiline text property configuration for
titlecontent.Declaration
Swift
@MainActor public lazy var title: FUIMultiLineText { get set }
-
:nodc:
Declaration
Swift
@MainActor open override var accessibilityLabel: String? { get set }