1234567891011121314151617181920212223242526272829303132333435 |
- //
- // TCPageIndicator.h
- // MyMacDevDemo
- //
- // Created by tangchao on 2021/12/11.
- //
- #import <Cocoa/Cocoa.h>
- NS_ASSUME_NONNULL_BEGIN
- @class TCPageIndicator;
- @protocol TCPageIndicatorDelegate <NSObject>
- - (void)pageIndicator:(TCPageIndicator *)pageIndicator didSelectPageAtIndex:(NSUInteger)idx;
- @end
- @interface TCPageIndicator : NSView
- @property (nonatomic, weak) id<TCPageIndicatorDelegate> delegate;
- @property (nonatomic, strong) NSColor *selectedColor;
- @property (nonatomic, strong) NSColor *normalColor;
- @property (nonatomic, assign) CGFloat indicatorMargin;
- @property (nonatomic, assign) NSUInteger currentPage;
- @property (nonatomic, assign) NSUInteger numberOfPages;
- @property (nonatomic, assign) NSSize pageIndicatorSize;
- // 是否响应事件 [默认为 YES ]
- @property (nonatomic, assign) BOOL enabled;
- @end
- NS_ASSUME_NONNULL_END
|