设置UIButton字体的大小
来源:互联网 发布:gbdt python实现 编辑:程序博客网 时间:2024/05/29 10:44
引入:
在IOS程序中设置UIButton的字体大小。
实现方式:
btn.frame = CGRectMake(x, y, width, height);
[btn setTitle: @"search" forState: UIControlStateNormal];
//设置按钮上的自体的大小
//[btn setFont: [UIFont systemFontSize: 14.0]]; //这种可以用来设置字体的大小,但是可能会在将来的SDK版本中去除改方法
//应该使用
btn.titleLabel.font = [UIFont systemFontOfSize: 14.0];
[btn seBackgroundColor: [UIColor blueColor]];
//最后将按钮加入到指定视图superView
[superView addSubview: btn];
转载:http://mmz06.blog.163.com/blog/static/1214169620116584826938/
- 设置UIButton字体的大小
- 设置UIButton字体的大小
- iOS9 UIButton设置字体颜色和字体的大小、字体的位置
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色 .
- 五月 25th, 2012设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- 设置UIButton的文字显示位置、字体的大小、字体的颜色
- UI:设置UIButton的文字显示位置、字体的大小、字体的颜色
- Android Fragment的使用
- oracle函数和存储过程有什么区别
- poj1160 动态规划
- C++语言中变量的储存类别
- POWERPCB常用技巧
- 设置UIButton字体的大小
- 了解日本的必读书目,《菊与刀》
- Linux native AIO与eventfd、epoll的结合使用
- C# 操作word文档
- 创业25年 华为是如何“步步为营”成为世界500强的?
- 抛弃ConfigurationManager , 实现面向对象读写配置文件
- Android开发入门之Intent深入解剖
- AngularJs 体验
- 安装软件提示“您的设备不支持add-on属性”的解决方法