项目介绍:
采用了UIActionSheet设计样式和人机交互,和UIActionController、UIActionSheet相似度达99.99%。
1.支持iOS8+
2.支持模糊背景切换控制
3.使用更简便
github下载地址
++++++++++++++++++++++++++++++++++++++++++++++++
XIActionSheet.h
[Objective-C] 查看源文件 复制代码
typedef NS_ENUM(NSInteger, XIActionSheetActionStyle) {
XIActionSheetButtonStyleDefault = 0,
//XIActionSheetButtonStyleCancel,
XIActionSheetButtonStyleDestructive
};
@class XIActionSheetButtonItem;
@interface XIActionSheet : UIView
@property(nonatomic, assign) BOOL blurEnabled;// default is YES.
- (instancetype)initWithTitle:(NSString *)title
message:(NSString *)message
cancelButtonTitle:(NSString *)cancelButtonTitle;
- (void)addButtonWithTitle:(NSString *)title
style:(XIActionSheetActionStyle)style
handler:(void(^)(XIActionSheet *actionSheet, XIActionSheetButtonItem *buttonItem))handler;
- (void)addDefaultStyleButtonWithTitle:(NSString *)title
handler:(void(^)(XIActionSheet *actionSheet, XIActionSheetButtonItem *buttonItem))handler;
- (void)show;// Show the ActionSheet on visible window.
- (void)showInView:(UIView *)view;
- (void)dismiss;// Removed from its parent view.
+ (void)remove;// Remove the ActionSheet on visible window.
+ (void)removeOnView:(UIView *)view;
@end
喜欢请star~~
有问题请回复
