calimarkus/JDFlipNumberView

Allow JDFlipViewRelativeMargin to be configured

cyrilchandelier opened this issue · 3 comments

This value should be configurable someplace in the component to enhance the rendering.

For instance with my custom design, the views are too close one from each other, I would like to set JDFlipViewRelativeMargin to something like 30%.

👍 agree. I might give this a shot.

Another way to think about it could be to add two values that work in points instead of percentages:

//! Outer padding in points
@property UIEdgeInsets insets;
//! Spacing between numbers in points
@property CGFloat numberMargin;

What do you think about that instead of doing a percentage margin?

We can make two properties:

@Property CGFloat relativeDigitMargin;
@Property CGFloat absoluteDigitMargin;

and then just use MAX(relative*width, absolute) as margin. Pull requests welcome.

Here you go! #42