TCPageIndicator.h 852 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // TCPageIndicator.h
  3. // MyMacDevDemo
  4. //
  5. // Created by tangchao on 2021/12/11.
  6. //
  7. #import <Cocoa/Cocoa.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @class TCPageIndicator;
  10. @protocol TCPageIndicatorDelegate <NSObject>
  11. - (void)pageIndicator:(TCPageIndicator *)pageIndicator didSelectPageAtIndex:(NSUInteger)idx;
  12. @end
  13. @interface TCPageIndicator : NSView
  14. @property (nonatomic, weak) id<TCPageIndicatorDelegate> delegate;
  15. @property (nonatomic, strong) NSColor *selectedColor;
  16. @property (nonatomic, strong) NSColor *normalColor;
  17. @property (nonatomic, assign) CGFloat indicatorMargin;
  18. @property (nonatomic, assign) NSUInteger currentPage;
  19. @property (nonatomic, assign) NSUInteger numberOfPages;
  20. @property (nonatomic, assign) NSSize pageIndicatorSize;
  21. // 是否响应事件 [默认为 YES ]
  22. @property (nonatomic, assign) BOOL enabled;
  23. @end
  24. NS_ASSUME_NONNULL_END