Guide pop-up bar component

更新时间:
复制 MD 格式

AUPopBar is a pop-up guide bar component.

Preview

API reference

@interface AUPopBar : AUView

AU_UNAVAILABLE_INIT

+ (instancetype)showInViewBottom:(UIView *)view
                        animated:(BOOL)animated
                        withText:(NSString *)text
                            icon:(UIImage *)icon
                     buttonTitle:(NSString *)buttonTitle
                     actionBlock:(BOOL(^)())actionBlock;

- (void)dismiss:(BOOL)animated;

@end

Code example

// Display
AUPopBar *popBar = [AUPopBar showInViewBottom:weakSelf.view animated:YES withText:@"Add 'City Services' to the home page" icon:[UIImage imageNamed:@"ap_scan"] buttonTitle:@"Add Now" actionBlock:^{
                    NSLog(@"Clicked");
                    return YES;
                }];

// Hide
[popBar dismiss:YES];