12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- //
- // CustomActionSheet.h
- // MIT_Shop
- //
- // Created by 翟玉磊 on 2017/10/17.
- // Copyright © 2017年 翟玉磊. All rights reserved.
- //
- //列表式sheet
- #import <UIKit/UIKit.h>
- @interface CustomActionSheet : UIView
- /**
- 快速创建
- @param title 标题
- @param cancel 取消按钮
- @param titles 其他按钮
- @return 返回实例
- */
- + (instancetype)showActionSheetWithTitle:(NSString *)title cancelTitle:(NSString *)cancel otherButtonTitles:(NSArray *)titles;
- /**
- 整个sheet的标题
- */
- @property (nonatomic, copy) NSString *title;
- /**
- 取消按钮标题
- */
- @property (nonatomic, copy) NSString *cancelTitle;
- /**
- 其他按钮标题数组 是可变数组
- */
- @property (nonatomic, strong) NSMutableArray *otherButtonTitleArray;
- /**
- 其他按钮的高度 默认OtherButtonHeight
- */
- @property (nonatomic, assign) CGFloat otherButtonHeight;
- /**
- 选中标示替换
- */
- @property (nonatomic, strong) UIImage *markImage;
- /**
- 显示
- */
- - (void)show;
- /**
- 隐藏
- */
- - (void)dismiss;
- /**
- 选中按钮回调(包含取消/确认按钮:索引是otherButtonTitleArray.count)
- buttonIndex 按钮索引
- selectedIndex 选中条件项的索引
- */
- @property (nonatomic, copy) void(^actionSheetDidSelectedAtIndex)(NSInteger buttonIndex, NSInteger selectedIndex);
- @end
|