All Products
Search
Document Center

Operation result dialog

Last Updated: May 25, 2021

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

result dialog

API description

 
  1. @interface AUOperationResultDialog : AUDialogBaseView
  2. /**
  3. Specify whether this instance is displayed. This applies when a pointer points at this instance.
  4. If another dialog box overrides this one, the attribute value is fixed as YES.
  5. */
  6. @property (nonatomic, assign, readonly) BOOL isDisplay;
  7. /**
  8. * The dialog box description.
  9. */
  10. @property (nonatomic, strong) NSString *describe;
  11. /**
  12. The method of dialog box initialization without the button title.
  13. @param image The image.
  14. @param describe The message details.
  15. @param delegate The AUDialogDelegate-compliant protocol object.
  16. @return The AUImageDialog instance.
  17. */
  18. - (instancetype)initWithImage:(UIImage *)image
  19. message:(NSString *)message
  20. delegate:(id<AUDialogDelegate>)delegate;
  21. /**
  22. The method of dialog box initialization with the button title.
  23. @param image The image.
  24. @param describe The message details.
  25. @param delegate The AUDialogDelegate-compliant protocol object.
  26. @param buttonTitle The list of button title parameters.
  27. @return The AUImageDialog instance.
  28. */
  29. - (instancetype)initWithImage:(UIImage *)image
  30. message:(NSString *)message
  31. delegate:(id<AUDialogDelegate>)delegate
  32. buttonTitles:(NSString *)buttonTitle, ... NS_REQUIRES_NIL_TERMINATION;
  33. /**
  34. With a download link.
  35. @param imageUrl The URL of the image.
  36. @param placeholder The placeholder image.
  37. @param describe The message details.
  38. @param delegate The AUDialogDelegate-compliant protocol object.
  39. @return The AUImageDialog instance.
  40. */
  41. - (instancetype)initWithImageUrl:(NSString *)imageUrl
  42. placeholder:(UIImage *)placeholder
  43. message:(NSString *)message
  44. delegate:(id<AUDialogDelegate>)delegate;
  45. /// The disabled initialization method.
  46. - (instancetype)init NS_UNAVAILABLE;
  47. /**
  48. The dialog box display method.
  49. */
  50. - (void)show;
  51. /**
  52. The method of closing the dialog box. If will/didDismissWithButtonIndex is monitored, the index called back is 0 by default.
  53. */
  54. - (void)dismiss;
  55. /**
  56. Hide all dialog views in the dialog window.
  57. */
  58. + (void)dismissAll;
  59. /**
  60. Add a common button and its callback method. The common button cannot contain an action.
  61. @param buttonTitle The common button title.
  62. @param actionBlock The callback of the button.
  63. */
  64. - (void)addButton:(NSString *)buttonTitle actionBlock:(AUDialogActionBlock)actionBlock;
  65. @end

Sample code

 
  1. UIImage *image = [UIImage imageNamed:@"panghu.jpg"];
  2. AUOperationResultDialog *dialog = [[AUOperationResultDialog alloc] initWithImage:image message:@"已发送" delegate:self];
  3. [dialog addButton:@"返回手机淘宝" actionBlock:nil];
  4. [dialog addButton:@"留在支付宝" actionBlock:nil];
  5. [dialog show];