CustomActionSheetController.h 802 B

12345678910111213141516171819202122232425262728
  1. //
  2. // CustomActionSheetController.h
  3. // Starbuds
  4. //
  5. // Created by 翟玉磊 on 2020/1/7.
  6. // Copyright © 2020 翟玉磊. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface CustomActionSheetController : UIViewController
  11. @property (nonatomic, readwrite, copy) NSString *titleString;
  12. @property (nonatomic, readwrite, copy) NSString *cancelString;
  13. - (instancetype)initWithTitle:(nullable NSString *)title categoryTitles:(NSArray *)titles cancel:(nullable NSString *)cancel selctedBlock:(void(^)(NSInteger index, NSString *title))block;
  14. /// 全屏显示,添加到windown上 建议使用此方法
  15. - (void)show;
  16. /// 显示到指定控制器上
  17. /// @param vc 父控制器不一定全屏
  18. - (void)showWithController:(UIViewController *)vc;
  19. @end
  20. NS_ASSUME_NONNULL_END