PhotoUploadUIProtocol
public protocol PhotoUploadUIProtocol
Photo Upload UI Protocol
-
Returns an instance of the class conforming to
PhotoUploadUIProtocol
protocolDeclaration
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
badge
The badge to select a picture for.
completion
Completion 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()