UIButton的title设置
来源:互联网 发布:广数车床g73编程实例 编辑:程序博客网 时间:2024/06/06 01:49
有些时候我们想让UIButton的title居左对齐,我们设置
btn.textLabel.textAlignment = UITextAlignmentLeft
是没有作用的,我们需要设置
btn.contentHorizontalAlignment = UIControlContentHorizonAlignmentLeft;
但是问题又出来,此时文字会紧贴到做边框,我们可以设置
btn.contentEdgeInsets = UIEdgeInsetsMake(0,10, 0, 0);
使文字距离做边框保持10个像素的距离。
0 0
- UIButton的title设置
- UIButton的title设置
- 设置UIButton中title的位置
- 如何设置UIButton中title的位置
- IOS开发 设置UIButton的title
- IOS 开发之设置UIButton的title
- UIButton 的 image 和title 位置设置
- IOS 开发之设置UIButton的title
- IOS 开发之设置UIButton的title
- IOS 开发之设置UIButton的title
- IOS 开发之设置UIButton的title
- 设置UIButton的image title 位置
- swift设置UIButton的title文字
- UIButton 设置title位置
- uibutton enable 设置title
- 设置UIButton的title 闪动效果的解决办法
- UIButton通过UIEdgeInsetsMake设置image和title的位置
- UIBUtton 的title内容如何设置对其方式
- 黑马程序员-指针小结
- MySQL 存储过程
- 细述PhpStorm 对 AngularJS 的支持
- linux压缩与解压缩 tar命令
- 南红镶嵌的方法有哪些
- UIButton的title设置
- MFC 打印程序的编制
- MySQL 触发器简单实例
- 【Android进阶】使用HttpURLConnection实现图片的下载与现显示
- 用JS验证表单数据时的提交问题
- 上下两个div之间距离
- ubuntu 下安装java
- Swift类导入OC工程演示
- conflicting types for xx错误(转)