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 implementationLoads avatar by the avatar URL.
Default Implementation
Declaration
Swift
func loadAvatar(completion: @escaping (_ image: UIImage?) -> Void)
-
updateAvatarURL(image:name:completion:)
Extension methodUpload a new avatar image.
Declaration
Swift
public func updateAvatarURL(image: UIImage, name: String = "avatar", completion: @escaping (_ error: Error?) -> Void)