UITabBarItem does not update image

回眸只為那壹抹淺笑 提交于 2019-12-12 03:45:01

问题


For some reason, only one image of my UITabBarItem does not show up. This started to happen after I refactored the storyboards to organize them. When I run the app, no message is triggered to the debugger, it just don't show up. The image is being set in storyboard and nothing programmatically is being done to set it. It shows up in Interface Builder, but when I run the app it doesn't.

Already tried delete the image in catalog, rename it and perform clean up, but nothing helped.


回答1:


Few things to be tested.

  • Check the image that exists or not in the image assets.
  • check if you set the image from storyboard or not of the image and if you change the name in the assets catalog then you should change from story board too i am attaching the image too
  • .




    回答2:


    Maybe the UITabBarItem itself is overlapped with another object and it comes underneath this object so it's hidden. Make sure is it the image that doesn't show up or the UITabBarItem itself..hope it may help




    回答3:


    After I refactored my storyboards, for some reason, the Tab Bar from the storyboard with the problem was removed. That was enough to "hide" the image. Adding a new UITabBarItem on it's navigation controller and configuring the image there solved my problem.



    来源:https://stackoverflow.com/questions/37912453/uitabbaritem-does-not-update-image

    易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
    该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!