Comments (3)
Something I haven't quit figured out yet.
It seems there is problem in the view hierarchy.
If you set in the storyboard the BarButtonItem to custom the barButtonItem.customView property stays nill therefore the badge being added as a subview of barButtonItem.customView is not possible. If I force it, the image you set up in the storyboard is overided by the custom view, therefore not appearing while the badge does.
I need to find a way to retrieve the custom view you set up in the storyboard and manually add it as the customView property of the BarButtonItem so the badge can work with it. But I did not get the time and chance to focus on that.
For the moment I can only suggest you do it programmatically. Hope this helps to understand the behaviour.
from bbbadgebarbuttonitem.
Thanks for feedback. I will try programatically.
Enviado desde mi iPhone.
El 21/03/2014, a las 11:06, Tanguy Aladenise [email protected] escribió:
Something I haven't quit figured out yet.
It seems there is problem in the view hierarchy.
If you set in the storyboard the BarButtonItem to custom the barButtonItem.customView property stays nill therefore the badge being added as a subview of barButtonItem.customView is not possible. If I force it, the image you set up in the storyboard is overided by the custom view, therefore not appearing while the badge does.
I need to find a way to retrieve the custom view you set up in the storyboard and manually add it as the customView property of the BarButtonItem so the badge can work with it. But I did not get the time and chance to focus on that.For the moment I can only suggest you do it programmatically. Hope this helps to understand the behaviour.
—
Reply to this email directly or view it on GitHub.
from bbbadgebarbuttonitem.
I looked into this now and it seem i am not able to retrieve UIBarButtonItem._view
of type UINavigationButton
, which could be used instead of the customView
, for adding the badge
, if used from the storyboard directly.
from bbbadgebarbuttonitem.
Related Issues (20)
- Updating badgeValue from AppDelegate didReceiveRemoteNotification HOT 2
- How to add action:@selector to barButton HOT 3
- tintcolor is missing HOT 2
- Broken commit link in https://github.com/CocoaPods/Specs HOT 4
- Please don't delete your release tags HOT 4
- A problem when using BBBadgeBarButtonItem HOT 1
- iOS 9 support HOT 7
- Badge is square instead of rounded in iOS 9 HOT 1
- ios 9 support not fine HOT 3
- In IOS 9 , ... badge change to rectangle .......can't get rounded badge... ! HOT 1
- Create release and update podspec HOT 2
- UIBarButtons disappeared in iOS 9.2 HOT 6
- @IBOutlet weak var cartBarItem: BBBadgeBarButtonItem! not working..... HOT 1
- It's not supported to RTL mode
- Badge label disappears when adding UISearchBar to navigation bar
- rotating button without the badge
- When count is 0, badges does hide
- Doesnt work with class assigned in interface builder. HOT 1
- Not working in iOS 10 HOT 1
- BadgeSize issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bbbadgebarbuttonitem.