是否可以自定义UIMenuController的颜色? [英] Is it possible to customize the color of a UIMenuController?

查看:89
本文介绍了是否可以自定义UIMenuController的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认背景颜色为黑色。如何更改颜色,类似于导航栏的 tintColor

The default background color is black. How can I change the color, similar to tintColor for navigation bars?

推荐答案

我很确定这是不可能的。如果你将它子类化,你可能可以解决一些问题。

I'm pretty sure this is not possible. You may be able to work something out if you subclass it.

编辑:我看了一下UIMenuController.h文件,似乎没有任何明显的改变颜色的方法。它是NSObject的子类,如果这对你有帮助的话。另外,如果你看一下人们如何将UITabBarController子类化来改变它的颜色,你就可以找到类似的解决方案。

I took a look at the UIMenuController.h file and there don't seem to be any obvious ways to change the color. It is a subclass of NSObject if that helps you. Also, if you take a look at how people subclass UITabBarController to change it's color you may be able to work out a similar solution.

这篇关于是否可以自定义UIMenuController的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆