FUSegmentedControl.h 937 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // FUSegmentedControl.h
  3. // FULiveDemo
  4. //
  5. // Created by 项林平 on 2022/10/19.
  6. //
  7. #import <UIKit/UIKit.h>
  8. #import <Masonry/Masonry.h>
  9. #import "FULiveDefine.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface FUSegmentedControl : UIView
  12. @property (nonatomic, strong, nullable) NSArray<NSString *> *items;
  13. @property (nonatomic, strong) UIColor *titleColor;
  14. @property (nonatomic, strong) UIColor *selectedTitleColor;
  15. @property (nonatomic, strong) UIFont *titleFont;
  16. @property (nonatomic, assign) NSUInteger selectedIndex;
  17. @property (nonatomic, copy) void (^selectHandler)(NSUInteger index);
  18. - (instancetype)initWithFrame:(CGRect)frame items:(nullable NSArray<NSString *> *)items;
  19. @end
  20. @interface FUSegmentedCell : UICollectionViewCell
  21. @property (nonatomic, strong, readonly) UILabel *textLabel;
  22. @property (nonatomic, strong) UIColor *textColor;
  23. @property (nonatomic, strong) UIColor *selectedTextColor;
  24. @end
  25. NS_ASSUME_NONNULL_END