UIBarButtonItem-Badge icon indicating copy to clipboard operation
UIBarButtonItem-Badge copied to clipboard

Property shouldHideBadgeAtZero not working in 64bit environment

Open Airtower opened this issue 9 years ago • 0 comments

I have tried many different ways to send a "0" to the BadgeValue and no matter which way I send it, it displays a 0. I can only assume this is the case because this line of code: [badgeValue isEqualToString:@"0"] in the UIButton.m file does not seem to be running correctly. Even though I can not see any reason why it won't run correctly.

Here are the different ways I have tried to send a NSString amount to the Badge: [NSString stringWithFormat:@"%ld", (long)updateNumber] [NSString stringWithFormat:@"%d" ,updateNumber] //This way gives errors in the 64 bit environment [NSString stringWithFormat:@"%lu", updateNumber] [NSString stringWithFormat:@"%i", updateNumber]//Also more errors [NSString stringWithFormat:@"%lu", (long)updateNumber]

None of the above work for me so I have had to add in code into my app that changes the "0" to a "". I could be doing something else wrong but I can't see it.

By the way, this is a great badge icon addition to the UIButton and UIBarButton classes. I wish apple would add this code in so everyone could use it. Thank you for creating this!

Airtower avatar Nov 05 '15 18:11 Airtower