Open bhr opened 4 years ago
The proposed changes allow FlexiblePageControl to be customizable via UIAppearance, for instance:
FlexiblePageControl
UIAppearance
let config = FlexiblePageControl.Config( displayCount: 5, dotSize: 6, dotSpace: 4, smallDotSizeRatio: 0.5, mediumDotSizeRatio: 0.7 ) FlexiblePageControl.appearance().pageIndicatorTintColor = UIColor.systemGray FlexiblePageControl.appearance().currentPageIndicatorTintColor = UIColor.systemBlue FlexiblePageControl.appearance().setConfig(config)
@objc dynamic
setConfig()
pageIndicatorTintColor
currentPageIndicatorTintColor
animateDuration
Config
class
NSObject
I found an issue with the displayCount not updating properly.
The issue has been fixed in the second commit. displayCount needs to be updated when setting calling setConfig:
displayCount
setConfig:
The proposed changes allow
FlexiblePageControl
to be customizable viaUIAppearance
, for instance:@objc dynamic
tosetConfig()
,pageIndicatorTintColor
,currentPageIndicatorTintColor
,animateDuration
Config
class
and inherit fromNSObject
.