FWPageControl
@interface FWPageControl : UIControl
FWPageControl
-
The Class of your custom UIView, make sure to implement FWDotViewProtocol, default FWDotView.
Declaration
Objective-C
@property (nonatomic, strong, nullable) Class dotViewClass;
-
UIImage to represent a dot.
Declaration
Objective-C
@property (nonatomic, strong, nullable) UIImage *dotImage;
-
UIImage to represent current page dot.
Declaration
Objective-C
@property (nonatomic, strong, nullable) UIImage *currentDotImage;
-
Dot size for dot views. Default is 8 by 8.
Declaration
Objective-C
@property (nonatomic) CGSize dotSize;
-
UIColor to represent a dot.
Declaration
Objective-C
@property (nonatomic, strong, nullable) UIColor *dotColor;
-
UIColor to represent current page dot.
Declaration
Objective-C
@property (nonatomic, strong, nullable) UIColor *currentDotColor;
-
Spacing between two dot views. Default is 8.
Declaration
Objective-C
@property (nonatomic) NSInteger spacingBetweenDots;
-
Delegate for FWPageControl
Declaration
Objective-C
@property (nonatomic, nullable) id<FWPageControlDelegate> delegate;
-
Number of pages for control. Default is 0.
Declaration
Objective-C
@property (nonatomic) NSInteger numberOfPages;
-
Current page on which control is active. Default is 0.
Declaration
Objective-C
@property (nonatomic) NSInteger currentPage;
-
Hide the control if there is only one page. Default is NO.
Declaration
Objective-C
@property (nonatomic) BOOL hidesForSinglePage;
-
Let the control know if should grow bigger by keeping center, or just get longer (right side expanding). By default YES.
Declaration
Objective-C
@property (nonatomic) BOOL shouldResizeFromCenter;
-
Return the minimum size required to display control properly for the given page count.
Declaration
Objective-C
- (CGSize)sizeForNumberOfPages:(NSInteger)pageCount;
Parameters
pageCount
Number of dots that will require display
Return Value
The CGSize being the minimum size required.