SBSDKUIDialogFactory

@interface SBSDKUIDialogFactory : NSObject

Factory class for creating instances of iOS system style alerts with extended functionality, e.g. displaying an image.

  • Creates and returns an instance of an alert for modal presentation.

    Declaration

    Objective-C

    + (nonnull UIViewController *)createWithTitle:(nullable NSString *)title
                                          message:(nullable NSString *)message
                               confirmButtonTitle:(nullable NSString *)buttonTitle
                                            image:(nullable UIImage *)image
                            didPressConfirmButton:(void (^_Nullable)(void))handler;

    Swift

    class func create(withTitle title: String?, message: String?, confirmButtonTitle buttonTitle: String?, image: UIImage?, didPressConfirmButton handler: (() -> Void)? = nil) -> UIViewController

    Parameters

    title

    The title of the alert.

    message

    The message of the alert.

    buttonTitle

    The confimration buttons title of the alert.

    image

    The image to be shown within the alert. Can be zoomed and scrolled.

    handler

    The completion handler to be called when the confirm button is pressed.

    Return Value

    The instance of the alert view controller.