作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我在容器 (UIView) 中有两个 UIButton。它们都有相同的选项(按钮标题除外):
但是当我在 iPhone 5S 上启动这个应用程序时,我得到如下结果:
我的问题是:为什么第一个按钮有水平居中的文本而第二个按钮没有?我希望他们都将标题水平居中。
您好,帕维尔
最佳答案
实际上,您的第一个按钮居中只是因为它的标题中有较短的单词。如果将第二个按钮的标题设置为第一个按钮,您将获得相同的结果。
需要通过代码设置文本对齐方式,使标题居中:
[button.titleLabel setTextAlignment: NSTextAlignmentCenter];
关于ios - UIButton 水平居中,自动换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28560760/
在 Vaadin 7.0,显示时JavaBean Table 中的数据与 BeanContainer ,用新数据刷新表的正确方法是什么? 最佳答案 该表通过监听器监视表项的属性。如果您通过表的 Ite
首先,我使用的是带有 Axis2 1.6.2 的 eclipse,我正在 tomcat 6 上部署我创建的 Web 服务。Web 服务是在 eclipse 中通过自上而下的方法创建的。 我被要求使对我
我已将 Rails 3.1.1 应用程序升级到 Rails 3.1.3,现在,对于每个请求,它仅响应错误数量的参数(3 for 1)。不幸的是,它没有说明错误在哪里,并且应用程序跟踪为空。我认为存在一
我是一名优秀的程序员,十分优秀!