全部產品
Search
文件中心

Mobile Platform as a Service:引導提示組件

更新時間:Jul 13, 2024

AUPopTipView 為引導提示組件。

效果圖

image.png

介面說明

typedef NS_ENUM(NSInteger, AUPopViewIndicatorDirection) {
    AUPopViewIndicatorDirectionUp,
    AUPopViewIndicatorDirectionDown,
};

@interface AUPopTipView : AUPopDrawBoardView

AU_UNAVAILABLE_INIT

@property (nonatomic, assign) AUPopViewIndicatorDirection indicatorDirection;

- (void)dismiss:(BOOL)animated;

+ (instancetype)showFromView:(UIView *)fromView
                   fromPoint:(CGPoint)fromPoint
                      toView:(UIView *)toView
                    animated:(BOOL)animated
                    withText:(NSString *)text
                 buttonTitle:(NSString *)buttonTitle;

@end

程式碼範例

// 展示
AUPopTipView *popTipView = [AUPopTipView showFromView:button
                                            fromPoint:CGPointZero
                                               toView:self.view
                                             animated:YES
                                             withText:@"你好福建省"
                                          buttonTitle:@"關閉"]; // 當 buttontitle 不傳遞時,右邊按鈕不顯示

// 隱藏
[popTipView dismiss:YES];