Skip to content

Conversation

@bhr
Copy link

@bhr bhr commented Jun 4, 2020

The proposed changes allow FlexiblePageControl to be customizable via UIAppearance, for instance:

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)
  • Add @objc dynamic to setConfig(), pageIndicatorTintColor, currentPageIndicatorTintColor, animateDuration
  • Make Config class and inherit from NSObject.

- Add @objc dynamic to setConfig(), pageIndicatorTintColor, currentPageIndicatorTintColor, animateDuration
- Make Config class and inherit from NSObject.
@bhr
Copy link
Author

bhr commented Aug 3, 2020

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant