tanguyaladenise / bbbadgebarbuttonitem Goto Github PK
View Code? Open in Web Editor NEWA BarButtonItem with a badge on top.
License: MIT License
A BarButtonItem with a badge on top.
License: MIT License
Hey there,
First of all, thanks for making this UIBarButtonItem badge :)
Last month a fix for the rounded corners issue on iOS 9 was merged and I was hoping you could make this available via Cocoapods?
Thanks
I have just upgraded one of my Apps under development to iOS 9.2 and I have found that all navigationbar UIBarButtons have just disappeared and are not shown on the navigation bar.
How to set the bar item for IBoutlet
@IBOutlet weak var cartBarItem: BBBadgeBarButtonItem!
// Add it as the of the navigation bar
self.cartBarItem = barButtonCart
Badge label just disappeared after adding a UISearchBar to navigation bar's title view.
I could not even put it back to work after UISearchBar was removed from navigation bar.
Tried many hacky ways as well but neither did work, so I'm puzzled.
ios 9 support not fine
Please add a cocoa pod to this project.
I am not able to resize badgeSize using badgeMinSize
I'm [unsuccessfully] trying to update the badgeValue from the AppDelegate, barButton is nil.
BBBadgeBarButtonItem *barButton = (BBBadgeBarButtonItem *)self.window.rootViewController.navigationItem.leftBarButtonItem;
barButton.badgeValue = [NSString stringWithFormat:@"%d", [barButton.badgeValue intValue] + 1];
I need to add a method to a barButton.
How to do it?
Thanks.
I am Yanzi Li ,a new to learn iOS dev.Sorry to bother you to share my problem when i use BBBadgeBarButtonItem.The problem is that when i set title text for custom button instead of setting a image for it,the custom button title will cover a part of badge ,which is not the case i want.I hope the badge will cover a part of the custom button title. How can i solve this problem ?Thanks a lot.
Thank you TanguyAladenise for your effort,
When the application is RTL mode , i need to change alignment badge to left.
Thank you again,
NSInteger count = ([listOfUnread count]) ? [listOfUnread count] : 0;
BBBadgeBarButtonItem *barButton = [[BBBadgeBarButtonItem alloc] initWithCustomUIButton:show];
barButton.badgeValue = [NSString stringWithFormat:@"%lu", count];
barButton.badgeBGColor = colorBadgeColor;
barButton.shouldHideBadgeAtZero = YES;
barButton.shouldAnimateBadge = YES;
this is how im using your framework but when listOfUnread.count is 0 the badge doesnt disappear, it stays there with a 1
The badge value is there but the navigation bar icon is gone. But it's working in iOS 11.
You have old commit link here
https://github.com/CocoaPods/Specs/blob/master/Specs/BBBadgeBarButtonItem/1.0/BBBadgeBarButtonItem.podspec.json
So cocoapods installs not last version
I've noticed that when the badge animates, it shows show a bit cut off for some miliseconds. This is probably due to the superview's bounds. Increasing the bounds a little bit might fix it.
You're breaking our projects that are using cocoapods with the following Podfile
pod 'BBBadgeBarButtonItem',
:git => 'https://github.com/TanguyAladenise/BBBadgeBarButtonItem',
:tag => '1.0'
It works perfectly well in iOS 8, but the red badge appears square instead of rounded under iOS 9.
If I add a barButtonItem in the navigation bar and change its custom class to BBBadgeBarButtonItem and in my code write:
BBBadgeBarButtonItem* chatBarButtonItem=(BBBadgeBarButtonItem*)self.navigationItem.rightBarButtonItem;
chatBarButtonItem.badgeValue=@"1";
It does not work.
Any help?
Hi guys. I tried to do an animation on the BarButton while a Badge was displayed.
Since the Badge is attached to the Button, both will rotate. I only want the button image to rotate without the badge. Couldnt find a way to do that. Any inputs?
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.