PhotoUploadUIProtocol
public protocol PhotoUploadUIProtocol
Photo Upload UI Protocol
-
Returns an instance of the class conforming to
PhotoUploadUIProtocolprotocolDeclaration
Swift
static func instance() -> PhotoUploadUIProtocol? -
Propmts the user to select a profile picture for the badge.
Declaration
Swift
func promptForUserPhotoUpload(forBadge badge: Badge, completion: @escaping (_ image: UIImage?, _ uploadFailureHandler: UsherFailureHandler?) -> Void)Parameters
badgeThe badge to select a picture for.
completionCompletion block to call once the user selects an image. Pass the UIImage object to this completion block. The completion block also takes an uploadFailureHandler block as a parameter that will be called in case uploading the image fails. Use this block to present error to user and/or retry selecting another image.
-
Dismiss any UI presented by the
promptForUserPhotoUpload(_:completion:)Declaration
Swift
func dismiss()
PhotoUploadUIProtocol Protocol Reference