Class
Avatar
public final class Avatar: UIView
Avatars are used to quickly identify users. When an image isn’t available, initials are used instead.
Relationships
Nested Types
Avatar.Size
Defines standard sizes for Avatar items in the design system Standard values are as follows. A
.custom
case exists for passing an arbitrary value.Avatar.Configuration
Conforms To
UIView
Properties
textColor
public var textColor: UIColor = ColorManager.Primary.fiveHundred
The color used by the name label when no image is set
animationDuration
public var animationDuration: TimeInterval = 0.25
The duration of the toggle animation. Set to 0 to disable animations.
isSelected
@Published public var isSelected: Bool = false
Methods
nameToInitials(_:)
public static func nameToInitials(_ name: String) -> String
layoutSubviews()
public override func layoutSubviews()
touchesBegan(_:with:)
public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?)
touchesCancelled(_:with:)
public override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?)
touchesEnded(_:with:)
public override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?)
make(name:image:size:contentMode:)
static func make(
name: String?,
image: UIImage?,
size: Avatar.Size,
contentMode: ContentMode = .scaleAspectFit
) -> Avatar
Factory method for producing an Avatar component of a given size.
-
Tag: make
makeGroup(size:configurations:)
static func makeGroup(size: Avatar.Size, configurations: [Configuration]) -> AvatarGroup
Makes an AvatarGroup