欢迎光临
我们一直在努力

使用更简便自定义ActionSheet,和原生相似度达99%

建站超值云服务器,限时71元/月

使用更简便自定义ActionSheet,和原生相似度达99%

项目介绍:

采用了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~~
有问题请回复

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 使用更简便自定义ActionSheet,和原生相似度达99%
分享到: 更多 (0)