PGPickerColumnView.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // PGPickerColumnView.h
  3. // PGPickerView
  4. //
  5. // Created by piggybear on 2017/7/26.
  6. // Copyright © 2017年 piggybear. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @protocol PGPickerColumnViewDelegate;
  10. @interface PGPickerColumnView : UIView
  11. @property (nonatomic, weak) id<PGPickerColumnViewDelegate> delegate;
  12. @property (nonatomic, strong) NSArray *datas;
  13. @property (nonatomic, assign) NSUInteger component;
  14. @property (nonatomic, assign) NSUInteger selectedRow;
  15. @property (nonatomic, strong) NSArray<UIColor *> *viewBackgroundColors;
  16. @property (nonatomic, assign) BOOL refresh;
  17. @property (nonatomic, copy) NSString *textOfSelectedRow;
  18. @property (nonatomic, strong)UIColor *textColorOfSelectedRow;
  19. @property(nonatomic, strong) UIFont *textFontOfSelectedRow;
  20. @property (nonatomic, strong)UIColor *textColorOfOtherRow;
  21. @property(nonatomic, strong) UIFont *textFontOfOtherRow;
  22. @property(nonatomic, assign) BOOL isHiddenWheels;
  23. - (instancetype)initWithFrame:(CGRect)frame rowHeight:(CGFloat)rowHeight upLineHeight:(CGFloat)upLineHeight downLineHeight:(CGFloat)downLineHeight;
  24. - (void)selectRow:(NSInteger)row animated:(BOOL)animated;
  25. @end
  26. @protocol PGPickerColumnViewDelegate<NSObject>
  27. @optional
  28. - (void)pickerColumnView:(PGPickerColumnView *)pickerColumnView didSelectRow:(NSInteger)row;
  29. - (void)pickerColumnView:(PGPickerColumnView *)pickerColumnView title:(NSString *)title didSelectRow:(NSInteger)row;
  30. - (UIFont *)pickerColumnView:(PGPickerColumnView *)pickerColumnView textFontOfOtherRow:(NSInteger)row InComponent:(NSInteger)component;
  31. - (UIColor *)pickerColumnView:(PGPickerColumnView *)pickerColumnView textColorOfOtherRow:(NSInteger)row InComponent:(NSInteger)component;
  32. @end