AvatarRepresentable

public protocol AvatarRepresentable : AnyObject, UserProtocol

An avatar container protocol.

  • An avatar URL.

    Declaration

    Swift

    var avatarURL: URL? { get set }
  • An avatar downloaded image.

    Declaration

    Swift

    var avatarImage: UIImage? { get set }
  • loadAvatar(completion:) Default implementation

    Loads avatar by the avatar URL.

    Default Implementation

    Declaration

    Swift

    func loadAvatar(completion: @escaping (_ image: UIImage?) -> Void)
  • Upload a new avatar image.

    Declaration

    Swift

    public func updateAvatarURL(image: UIImage, name: String = "avatar", completion: @escaping (_ error: Error?) -> Void)