Coder Social home page Coder Social logo

Comments (3)

TanguyAladenise avatar TanguyAladenise commented on June 18, 2024

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.

Ricardo1980 avatar Ricardo1980 commented on June 18, 2024

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.

erf avatar erf commented on June 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.