BasePickerViewController.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // BasePickerViewController.h
  3. // LiveTV
  4. //
  5. // Created by 翟玉磊 on 2019/4/24.
  6. // Copyright © 2019 翟玉磊. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. typedef void(^BasePickerSureActionBlock)(NSInteger index, id info);
  11. @interface BasePickerViewController : UIViewController
  12. @property (nonatomic, readwrite, strong) UIViewController *parentController;
  13. @property (nonatomic, readwrite, copy) NSString *titleText;
  14. @property (nonatomic, readwrite, copy) NSString *cancelText;
  15. @property (nonatomic, readwrite, copy) NSString *sureText;
  16. @property (nonatomic, readwrite, strong) UIColor *titleTextColor;
  17. @property (nonatomic, readwrite, strong) UIColor *cancelTextColor;
  18. @property (nonatomic, readwrite, strong) UIColor *sureTextColor;
  19. @property (nonatomic, readwrite, strong) UIFont *titleTextFont;
  20. @property (nonatomic, readwrite, strong) UIFont *cancelTextFont;
  21. @property (nonatomic, readwrite, strong) UIFont *sureTextFont;
  22. @property (nonatomic, readwrite, strong) UIColor *normaltextColor;
  23. @property (nonatomic, readwrite, strong) UIFont *normalTextFont;
  24. @property (nonatomic, readwrite, strong) UIColor *selectTextColor;
  25. @property (nonatomic, readwrite, strong) UIFont *selectTextFont;
  26. - (instancetype)initWithTitle:(NSString *)title dataArray:(NSArray *)dataArray target:(UIViewController *)target sureBlock:(void(^)(NSInteger index, id info))block;
  27. - (void)show;
  28. /// 显示到指定控制器上
  29. - (void)showWithController:(UIViewController *)controller;
  30. - (void)dismiss;
  31. /// 选择指定文本的item
  32. - (void)selectedItemWithText:(NSString *)text;
  33. @end
  34. NS_ASSUME_NONNULL_END