1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #import <UIKit/UIKit.h>
- typedef NS_ENUM(NSInteger, AHKActionSheetButtonType) {
- AHKActionSheetButtonTypeDefault = 0,
- AHKActionSheetButtonTypeDisabled,
- AHKActionSheetButtonTypeDestructive,
- AHKActionSheetButtonTypeEncrypted
- };
- @class AHKActionSheet;
- typedef void(^AHKActionSheetHandler)(AHKActionSheet *actionSheet);
- @interface AHKActionSheet : UIView <UIAppearanceContainer>
- @property (nonatomic) CGFloat buttonHeight UI_APPEARANCE_SELECTOR;
- @property (nonatomic) CGFloat cancelButtonHeight UI_APPEARANCE_SELECTOR;
- @property (nonatomic) CGFloat separatorHeight UI_APPEARANCE_SELECTOR;
- @property (strong, nonatomic) NSNumber *automaticallyTintButtonImages UI_APPEARANCE_SELECTOR;
- @property (strong, nonatomic) NSNumber *buttonTextCenteringEnabled UI_APPEARANCE_SELECTOR;
- @property (strong, nonatomic) UIColor *separatorColor UI_APPEARANCE_SELECTOR;
- @property (copy, nonatomic) NSDictionary *buttonTextAttributes UI_APPEARANCE_SELECTOR;
- @property (copy, nonatomic) NSDictionary *disableButtonTextAttributes UI_APPEARANCE_SELECTOR;
- @property (copy, nonatomic) NSDictionary *destructiveButtonTextAttributes UI_APPEARANCE_SELECTOR;
- @property (copy, nonatomic) NSDictionary *encryptedButtonTextAttributes UI_APPEARANCE_SELECTOR;
- @property (copy, nonatomic) NSDictionary *cancelButtonTextAttributes UI_APPEARANCE_SELECTOR;
- @property (nonatomic) NSTimeInterval animationDuration UI_APPEARANCE_SELECTOR;
- @property (strong, nonatomic) NSNumber *cancelOnPanGestureEnabled UI_APPEARANCE_SELECTOR;
- @property (strong, nonatomic) NSNumber *cancelOnTapEmptyAreaEnabled UI_APPEARANCE_SELECTOR;
- @property (strong, nonatomic) AHKActionSheetHandler cancelHandler;
- @property (copy, nonatomic) NSString *cancelButtonTitle;
- @property (copy, nonatomic) UIColor *cancelButtonBackgroudColor;
- @property (copy, nonatomic) NSString *title;
- @property (strong, nonatomic) UIView *headerView;
- @property (weak, nonatomic, readonly) UIWindow *previousKeyWindow;
- @property (nonatomic, weak) UIView *view;
- @property CGFloat bottomPadding;
- - (instancetype)initWithView:(UIView *)view title:(NSString *)title;
- - (void)addButtonWithTitle:(NSString *)title image:(UIImage *)image backgroundColor:(UIColor *)backgroundColor height:(CGFloat)height type:(AHKActionSheetButtonType)type handler:(AHKActionSheetHandler)handler;
- - (void)show;
- - (void)dismissAnimated:(BOOL)animated;
- @end
|