All Products
Search
Document Center

Operation result dialog

Last Updated: Feb 22, 2022

AUOperationResultDialog is a dialog box with a result image. The default size of the image is 90 x 58, in pixels. UED requires the style. The window level of AUOperationResultDialog is: self.windowLevel = UIWindowLevelAlert - 1.

Note

AUOperationResultDialog applies only to social sharing and checkout counter business. For the dialog box applying to other business, see AUImageDialog.

Sample image

sent successfully

API description

@interface AUOperationResultDialog : AUDialogBaseView

/**
 Specify whether this instance is displayed. This applies when a pointer points at this instance.
 If another dialog box overrides this one, the attribute value is fixed as YES.
 */
@property (nonatomic, assign, readonly) BOOL isDisplay;

/**
 * The dialog box description.
 */
@property (nonatomic, strong) NSString *describe;

/**
 The method of dialog box initialization without the button title.

 @param image       The image.
 @param describe    The message details.
 @param delegate    The AUDialogDelegate-compliant protocol object.
 @return            The AUImageDialog instance.
 */
- (instancetype)initWithImage:(UIImage *)image
                      message:(NSString *)message
                     delegate:(id<AUDialogDelegate>)delegate;

/**
 The method of dialog box initialization with the button title.

 @param image       The image.
 @param describe    The message details.
 @param delegate    The AUDialogDelegate-compliant protocol object.
 @param buttonTitle The list of button title parameters.
 @return            The AUImageDialog instance.
 */
- (instancetype)initWithImage:(UIImage *)image
                      message:(NSString *)message
                     delegate:(id<AUDialogDelegate>)delegate
                 buttonTitles:(NSString *)buttonTitle, ... NS_REQUIRES_NIL_TERMINATION;

/**
 With a download link.

 @param imageUrl    The URL of the image.
 @param placeholder The placeholder image.
 @param describe    The message details.
 @param delegate    The AUDialogDelegate-compliant protocol object.
 @return            The AUImageDialog instance.
 */
- (instancetype)initWithImageUrl:(NSString *)imageUrl
                     placeholder:(UIImage *)placeholder
                         message:(NSString *)message
                        delegate:(id<AUDialogDelegate>)delegate;

/// The disabled initialization method.
- (instancetype)init NS_UNAVAILABLE;

/**
 The dialog box display method.
 */
- (void)show;

/**
 The method of closing the dialog box. If will/didDismissWithButtonIndex is monitored, the index called back is 0 by default.
 */
- (void)dismiss;

/**
 Hide all dialog views in the dialog window.
 */
+ (void)dismissAll;

/**
 Add a common button and its callback method. The common button cannot contain an action.

 @param buttonTitle The common button title.
 @param actionBlock The callback of the button.
 */
- (void)addButton:(NSString *)buttonTitle actionBlock:(AUDialogActionBlock)actionBlock;

@end

Sample code

UIImage *image = [UIImage imageNamed:@"panghu.jpg"];
    AUOperationResultDialog *dialog = [[AUOperationResultDialog alloc] initWithImage:image message:@"Sent successfully" delegate:self];
    [dialog addButton:@"Back to Taobao" actionBlock:nil];
    [dialog addButton:@"Stay in Alipay" actionBlock:nil];
    [dialog show];