Skip to content
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

Property shouldHideBadgeAtZero not working in 64bit environment #16

Open
Airtower opened this issue Nov 5, 2015 · 0 comments
Open

Property shouldHideBadgeAtZero not working in 64bit environment #16

Airtower opened this issue Nov 5, 2015 · 0 comments

Comments

@Airtower
Copy link

Airtower commented Nov 5, 2015

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant