New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make AnimatableSlider inherit from UISlider and add designable images #417
Conversation
Thumb, minimum and maximum track
Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like you PR very much with a lot of documentation comments 👍👍👍. I think this PR is ready to go. It will be greate if you can modify the CHANGELOG.md file. It is very simple like https://github.com/IBAnimatable/IBAnimatable/blob/master/CHANGELOG.md#enhancements
One thing I need to confirm with @tbaranes on why did we inherit from UIView
. If he is OK, we will merge it. Thanks again 💪
|
||
} | ||
|
||
extension SliderImagesDesignable where Self: UISlider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to make it public
for the others can use those extension methods outside of IBAnimatable
framework.
extension SliderImagesDesignable where Self: UISlider { | ||
|
||
func configureThumbImage() { | ||
self.setThumbImage(thumbImage, for: .normal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we remove all self
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, also all the others below 😬
@phimage thank you very much for your PR. Please have a look at my small comments. @tbaranes In #228, we created If we want to have fully customizable |
extension SliderImagesDesignable where Self: UISlider { | ||
|
||
func configureThumbImage() { | ||
self.setThumbImage(thumbImage, for: .normal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, also all the others below 😬
I agree with you @JakeLin, that PR is a good move since it's making @phimage Good job on this! |
Ok for the changes ( I will fix also some changelog issue with markdown comma |
Update Changelog and fix it
AnimatableSlider
do not extendsUISlider
, onlyUIView
thumb, minimum and maximum track images added has designable objects in storyboard
PS:
I try some experiment on slider size by overriding
trackRect()
There is some bug when using maximum and minimum images
to fix some other bugs in storyboard I use in
trackRect()