All Products
Search
Document Center

Mobile Platform as a Service:Result page component

Last Updated:Oct 30, 2023

AUResultView displays status result views with an image.

API description

/**
The result view that displays the status.
*/
@interface AUResultView : UIView

/**
The image at the top.
*/
@property (nonatomic, strong) UIImage *icon;

/**
The middle-sized title in black at the top of the text field.
*/
@property (nonatomic, strong) NSString *mainTitleText;

/**
The large-sized title in black in the middle.
*/
@property (nonatomic, strong) NSString *midTitleText;

/**
The message in gray at the bottom.
*/
@property (nonatomic, strong) NSString *bottomMessage;

/**
Specify whether strikethrough is added to the message at the bottom.
*/
@property (nonatomic, assign) BOOL messageThrough;

/**
The expected height of the view. You can obtain the value after initialization is completed.
*/
@property (nonatomic, assign, readonly) CGFloat expectHeight;

/**
The ResultView instance method.

@param icon             The image.
@param mainTitleText    The first title.
@param midTitleText     The large-sized title in the middle.
@param bottomMessage    The message in gray at the bottom.
@param messageThrough   Specify whether strikethrough is added to the message.
@return                 The AUResultView instance.
*/
- (instancetype)initWithIcon:(UIImage *)icon mainTitleText:(NSString *)mainTitleText midTitleText:(NSString *)midTitleText bottomMessage:(NSString *)bottomMessage messageThrough:(BOOL)messageThrough;

Code sample

UIImage *image = AUBundleImage(@"alipay-60");
AUResultView *resultView = [[AUResultView alloc] initWithIcon:image
mainTitleText:@"Payment succeeded"
midTitleText:@"998.00"
bottomMessage:@"CNY 1098.00"
messageThrough:YES];
resultView.frame = CGRectMake(marginX, originY, AUCommonUIGetScreenWidth()-2*marginX, resultView.expectHeight);
[self.view addSubview:resultView];