1
1
//
2
2
// FXPageControl.h
3
3
//
4
- // Version 1.4
4
+ // Version 1.6
5
5
//
6
6
// Created by Nick Lockwood on 07/01/2010.
7
7
// Copyright 2010 Charcoal Design
31
31
//
32
32
33
33
34
- #pragma GCC diagnostic push
35
- #pragma GCC diagnostic ignored "-Wobjc-missing-property-synthesis"
34
+ #pragma clang diagnostic push
35
+ #pragma clang diagnostic ignored "-Wobjc-missing-property-synthesis"
36
36
#import < UIKit/UIKit.h>
37
37
38
38
39
- #import < Availability.h>
40
- #undef weak_delegate
41
- #if __has_feature(objc_arc_weak)
42
- #define weak_delegate weak
43
- #else
44
- #define weak_delegate unsafe_unretained
45
- #endif
39
+ NS_ASSUME_NONNULL_BEGIN
46
40
47
41
48
42
extern const CGPathRef FXPageControlDotShapeCircle;
@@ -59,7 +53,7 @@ IB_DESIGNABLE @interface FXPageControl : UIControl
59
53
- (CGSize)sizeForNumberOfPages : (NSInteger )pageCount ;
60
54
- (void )updateCurrentPageDisplay ;
61
55
62
- @property (nonatomic , weak_delegate ) IBOutlet id <FXPageControlDelegate> delegate;
56
+ @property (nonatomic , weak ) IBOutlet id <FXPageControlDelegate> delegate;
63
57
64
58
@property (nonatomic , assign ) IBInspectable NSInteger currentPage;
65
59
@property (nonatomic , assign ) IBInspectable NSInteger numberOfPages;
@@ -68,21 +62,25 @@ IB_DESIGNABLE @interface FXPageControl : UIControl
68
62
@property (nonatomic , assign , getter = isWrapEnabled) IBInspectable BOOL wrapEnabled;
69
63
@property (nonatomic , assign , getter = isVertical) IBInspectable BOOL vertical;
70
64
71
- @property (nonatomic , strong ) IBInspectable UIImage *dotImage;
72
65
@property (nonatomic , assign ) IBInspectable CGPathRef dotShape;
73
66
@property (nonatomic , assign ) IBInspectable CGFloat dotSize;
74
- @property (nonatomic , strong ) IBInspectable UIColor *dotColor;
75
- @property (nonatomic , strong ) IBInspectable UIColor *dotShadowColor;
76
67
@property (nonatomic , assign ) IBInspectable CGFloat dotShadowBlur;
77
68
@property (nonatomic , assign ) IBInspectable CGSize dotShadowOffset;
69
+ @property (nonatomic , assign ) IBInspectable CGFloat dotBorderWidth;
70
+ @property (nonatomic , strong , nullable ) IBInspectable UIImage *dotImage;
71
+ @property (nonatomic , strong , nullable ) IBInspectable UIColor *dotColor;
72
+ @property (nonatomic , strong , nullable ) IBInspectable UIColor *dotShadowColor;
73
+ @property (nonatomic , strong , nullable ) IBInspectable UIColor *dotBorderColor;
78
74
79
- @property (nonatomic , strong ) IBInspectable UIImage *selectedDotImage;
80
75
@property (nonatomic , assign ) IBInspectable CGPathRef selectedDotShape;
81
76
@property (nonatomic , assign ) IBInspectable CGFloat selectedDotSize;
82
- @property (nonatomic , strong ) IBInspectable UIColor *selectedDotColor;
83
- @property (nonatomic , strong ) IBInspectable UIColor *selectedDotShadowColor;
84
77
@property (nonatomic , assign ) IBInspectable CGFloat selectedDotShadowBlur;
85
78
@property (nonatomic , assign ) IBInspectable CGSize selectedDotShadowOffset;
79
+ @property (nonatomic , assign ) IBInspectable CGFloat selectedDotBorderWidth;
80
+ @property (nonatomic , strong , nullable ) IBInspectable UIImage *selectedDotImage;
81
+ @property (nonatomic , strong , nullable ) IBInspectable UIColor *selectedDotColor;
82
+ @property (nonatomic , strong , nullable ) IBInspectable UIColor *selectedDotShadowColor;
83
+ @property (nonatomic , strong , nullable ) IBInspectable UIColor *selectedDotBorderColor;
86
84
87
85
@property (nonatomic , assign ) IBInspectable CGFloat dotSpacing;
88
86
@@ -92,15 +90,18 @@ IB_DESIGNABLE @interface FXPageControl : UIControl
92
90
@protocol FXPageControlDelegate <NSObject >
93
91
@optional
94
92
95
- - (UIImage *)pageControl : (FXPageControl *)pageControl imageForDotAtIndex : (NSInteger )index ;
93
+ - (nullable UIImage *)pageControl : (FXPageControl *)pageControl imageForDotAtIndex : (NSInteger )index ;
96
94
- (CGPathRef)pageControl : (FXPageControl *)pageControl shapeForDotAtIndex : (NSInteger )index ;
97
95
- (UIColor *)pageControl : (FXPageControl *)pageControl colorForDotAtIndex : (NSInteger )index ;
98
96
99
- - (UIImage *)pageControl : (FXPageControl *)pageControl selectedImageForDotAtIndex : (NSInteger )index ;
97
+ - (nullable UIImage *)pageControl : (FXPageControl *)pageControl selectedImageForDotAtIndex : (NSInteger )index ;
100
98
- (CGPathRef)pageControl : (FXPageControl *)pageControl selectedShapeForDotAtIndex : (NSInteger )index ;
101
99
- (UIColor *)pageControl : (FXPageControl *)pageControl selectedColorForDotAtIndex : (NSInteger )index ;
102
100
103
101
@end
104
102
105
103
106
- #pragma GCC diagnostic pop
104
+ NS_ASSUME_NONNULL_END
105
+
106
+
107
+ #pragma clang diagnostic pop
0 commit comments