-
Notifications
You must be signed in to change notification settings - Fork 212
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
I add tiny mode and backgroudimage for the JSBadgeView #54
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 19b94ec.
how to use the 'tinymode', could U give some illustration or example? |
Hi! Thanks for the PR. There are some unrelated changes in this PR. Would you mind submitting a different one for each of the features that you'd like to add / change? Also, please take a look at the current code style to keep your code consistent with it. |
# Conflicts: # Pod/Classes/JSBadgeView.m
it shows in the demo, when number >= 100, the badge just show a red "dot" |
@@ -301,19 +331,51 @@ - (void)drawRect:(CGRect)rect | |||
const CGFloat marginToDrawInside = [self marginToDrawInside]; | |||
const CGRect rectToDraw = CGRectInset(rect, marginToDrawInside, marginToDrawInside); | |||
|
|||
UIBezierPath *borderPath = [UIBezierPath bezierPathWithRoundedRect:rectToDraw byRoundingCorners:(UIRectCorner)UIRectCornerAllCorners cornerRadii:CGSizeMake(JSBadgeViewCornerRadius, JSBadgeViewCornerRadius)]; | |||
UIBezierPath *borderPath; |
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.
Before adding all these new features to the API, I believe this implementation would need to simplify. This class used -drawRect:
back when it was doing complicated shadows and gradients. Now that it only supports "flat UI", there's no reason to continue doing this. Adding all this code just further complicates this implementation.
Given that I don't really have time to maintain this library, I will push back on these changes for that reason. I will however appreciate re-doing this view with AutoLayout, and without drawing with CoreGraphics instead.
thanks your project!,we use it in our project,we add tiny mode and backgroudimage for the JSBadgeView, also make some propriety can modify by user. Could you consider add it to your master branch?