-
Notifications
You must be signed in to change notification settings - Fork 135
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
因为tabbar上的点击控件是继承于uibarItem的 #9
Comments
恩 , 这个你看我demo 参考一下 , 里面有对UITabBar这块的设置 |
我看了,这个tabbarItem上的图片你是写死的,我要用json来控制主题的切换,使用标签 |
噢噢噢 那你直接给UITabBarItem的image属性添加设置就可以了 哈哈 |
重点是你没有为UITabBarItem设置对应的属性啊,我试了好几个都是直接崩溃,UITabBarItem这个有两种状态的,一个是选择时的图片,和没有选时的图片,求指点 |
我刚刚设置成功了,但是uitabbaritem的图片强加了渲染模式,就是这个属性UIImageRenderingMode,导致图片显示与原图差别很大,感觉这个属性一定要是 item.image = [[UIImage imageNamed:@“” imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];才有效,我这样: [item3.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];,就完全没用 |
大神,可以回复下嘛 |
对的 我猜测item在setImage时才会触发一些设置 而 你在设置image后 再设置image的mode 并不会再调用setImage 所以item的样式没有发生变化. |
你现在解决这个问题了吗? |
没有,不知道怎么玩了,你有解决的方案吗,一般主题很重要一部分就是tabbar的样式,但是我又不想自定义tabbar |
你的每个主题的图片是在工程里面吗? 还是存在沙盒? |
打算存沙盒里面去 |
|
这样子 你试试看 |
好,谢谢啊,下午试试,到时再反馈你 |
不行啊,完全不走里面的方法 |
不走? 你的标识符设置对吗 |
你把你的这段代码发上来 我看一下 |
你需要注意 这个标识符 在json的哪个类型中 (color , image , other) |
好,我再去试试 |
可以了,我之前是把tag认为是主题的tag了,谢谢啦 |
最后怎么设置好的?能看下代码吗?我的设置tabbar图片怎么一直有问题,选中字体颜色也不能及时切换过来,方便的话能加下QQ吗,我的QQ:847993171 |
No description provided.
The text was updated successfully, but these errors were encountered: