BottomBasePopupController.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // BottomBasePopupController.h
  3. // mask
  4. //
  5. // Created by 翟玉磊 on 2018/12/24.
  6. // Copyright © 2018 翟玉磊. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef void(^SelectedDidBlock)(NSInteger index);
  10. typedef void(^cancelActionBlock)(void);
  11. NS_ASSUME_NONNULL_BEGIN
  12. @interface BottomBasePopupController : UIViewController
  13. /// 标题
  14. @property (nonatomic, readwrite, copy) NSString *titleString;
  15. /// 选项
  16. @property (nonatomic, readwrite, strong) NSArray *dataArray;
  17. @property (nonatomic, readwrite, strong) UIViewController *parentController;
  18. @property (nonatomic, readwrite, copy) SelectedDidBlock selectedDidBlock;
  19. @property (nonatomic, readwrite, copy) cancelActionBlock cancelActionBlock;
  20. - (instancetype)initWithTitle:(NSString *)title categoryTitles:(NSArray *)titles target:(UIViewController *)target selctedBlock:(void(^)(NSInteger index))block;
  21. - (void)show;
  22. /// 显示到指定控制器上
  23. - (void)showWithController:(UIViewController *)controller;
  24. - (void)dismiss;
  25. @end
  26. NS_ASSUME_NONNULL_END