Monotouch:BarItem 徽章色调颜色?
当我设置徽章值时,它是红色背景白色字体。
是否可以将徽章的背景颜色更改为例如。蓝色的?
When I set the badge value, it's red background with white font.
Is it possible to change the background color of the badge to eg. blue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最近不得不这样做,但没有内置的方法。
但实际上,编写自己的控件并不难:
唯一稍微困难的部分是测量居中文本的长度。
自己动手,让您完全按照您的需要进行制作。我暴露了一个
int? Value
属性使得在我的应用程序以及ValueChanged
事件中使用变得非常容易。I had to do this recently and there isn't a built-in way.
But really, it's not that hard to write your own:
The only slightly difficult part is going to be measuring the length of the text for centering.
Rolling your own let's you make it exactly how you need. I exposed a
int? Value
property that made extremely easy to use from within my apps as well as aValueChanged
event.