lakesoft / lkbadgeview Goto Github PK
View Code? Open in Web Editor NEWCustom badge view
License: MIT License
Custom badge view
License: MIT License
Hello,
thank you for creating this badge view library.
It would be nice if you could update the podspec on the cocoa repo to version 1.2.0.
Thanks!
Hey there,
Thanks for the great badge. Save me lot of time!
Anyway, you've recently merged a nice pull request and it would be great to have it on CocoaPods. I know we already have version 1.0.0 there, but what about releasing a 1.1.0?
Don't know if it is you who update CocoaPods repo, but I think (not so sure) you need to create a new tag. Am I right?
Thanks in advance!
Vieira
sizeWithFont:(UIFont *) and drawAtPoint:(CGPoint *) withFont:(UIFont *) deprecation warnings when targeting iOS7.
Hello,
Firstly I really love this much better than the standard badge so thanks! I add the below to my viewwillappear.
LKBadgeView* badgeView =[[[LKBadgeView alloc] initWithFrame:CGRectMake(262, 366, 65, 20)]autorelease];
[self.view addSubview:badgeView];
badgeView.text = [NSString stringWithFormat:@"%d", [theProducts count]];
However when the badge count reaches say 2 digits i.e 20 then I remove my objects from my array and the view loads again. It resets the count to 0 which is correct however when going from 2 digits or more to 1 digit you can see the badge is not resizing even though I am using: It looks like its adding another subview over the old subview for 2 digits in the background if that makes sense. I apologise if this is my fault loading it into the view like this maybe i somehow have to unload the subview when the view disappears?
self.widthMode = LKBadgeViewWidthModeSmall;
Error:
"* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'"
Location:
- (void)_adjustBadgeFrameWith
{
CGSize suffixSize = [LK_BADGE_VIEW_TRUNCATED_SUFFIX sizeWithAttributes:@{NSFontAttributeName:self.font}];
......
}
self.font is nil
Code:
LKBadgeView *badgeView =
[[LKBadgeView alloc] initWithFrame:CGRectMake(cell.contentView.width - 10 - 50,
timeLabel.y + timeLabel.height + 10,
50,
20)];
badgeView.tag = CellBadgeTag;
badgeView.font = [UIFont systemFontOfSize:12.0f];
badgeView.widthMode = LKBadgeViewWidthModeSmall;
badgeView.horizontalAlignment = LKBadgeViewHorizontalAlignmentRight;
badgeView.badgeColor = [UIColor redColor];
badgeView.textColor = [UIColor whiteColor];
[cell.contentView addSubview:badgeView];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.