button中title和image的相对位置
来源:互联网 发布:java io总结 编辑:程序博客网 时间:2024/05/16 07:59
_btnChangeOthers = [[UIButton alloc]initWithFrame:CGRectMake(Screen_W-100-10, (kRegSuccessCellHeaderHeight-15.0f)/2.0f, 100, kRegSuccessCellHeaderHeight)];
[_btnChangeOthers setTitle:@"换一批" forState:UIControlStateNormal];
[_btnChangeOthers setImage:[UIImage imageNamed:@"refresh.png"] forState:UIControlStateNormal];
_btnChangeOthers.titleLabel.font = [UIFont systemFontOfSize:13.0f];
_btnChangeOthers.titleEdgeInsets = UIEdgeInsetsMake(0, -_btnChangeOthers.titleLabel.bounds.size.width, 0, _btnChangeOthers.imageView.bounds.size.width+5);
_btnChangeOthers.imageEdgeInsets = UIEdgeInsetsMake(0, _btnChangeOthers.titleLabel.bounds.size.width*2-5, 0, 0);
[_btnChangeOthers setTitleColor:RGBACOLOR(153, 163, 153, 1) forState:UIControlStateNormal];
[_btnChangeOthers setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[_btnChangeOthers setTitle:@"换一批" forState:UIControlStateNormal];
[_btnChangeOthers setImage:[UIImage imageNamed:@"refresh.png"] forState:UIControlStateNormal];
_btnChangeOthers.titleLabel.font = [UIFont systemFontOfSize:13.0f];
_btnChangeOthers.titleEdgeInsets = UIEdgeInsetsMake(0, -_btnChangeOthers.titleLabel.bounds.size.width, 0, _btnChangeOthers.imageView.bounds.size.width+5);
_btnChangeOthers.imageEdgeInsets = UIEdgeInsetsMake(0, _btnChangeOthers.titleLabel.bounds.size.width*2-5, 0, 0);
[_btnChangeOthers setTitleColor:RGBACOLOR(153, 163, 153, 1) forState:UIControlStateNormal];
[_btnChangeOthers setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[self addSubview:_btnChangeOthers];
效果为左边文字右边图片
0 0
- button中title和image的相对位置
- button中image和title的位置
- 更改button里面的Image和Title的位置
- Button调整按钮中title和image的位置(包含工具类)ios
- IOS button按钮中添加image和title并修改其位置
- 对Button上image 和 title 位置进行设置
- iOS-随心所欲控制button内image view和title view的位置
- 自定义Button的图片和title位置
- UIButton 的 image 和title 位置设置
- 自定义UIButton的title和image位置
- UIButton 调整title和image的位置
- button上的image和title的显示
- button中有 UIimage 有 title 设置它的位置
- [iOS]详解调整UIButton的title和image的位置
- iOS-调整UIButton的title和image的位置
- 详解调整UIButton的title和image的位置
- UIButton上image和title的位置调整
- UIButton通过UIEdgeInsetsMake设置image和title的位置
- HDU 1347 Grandpa is Famous
- MySQL操作监控
- 小韵游戏开发学习笔记——第一期:学习初衷
- OC08,09_内存管理
- Problem - 466C - Codeforces C. Number of Ways
- button中title和image的相对位置
- ( linker command failed with exit code 1)错误总结
- http、socket长连接和短连接
- Java通过FTP服务器上传下载文件的解决方案
- 使用IntelliJ IDEA 14和Maven创建java web项目
- 安卓开源框架集合
- 公共字串计算
- 小韵游戏开发学习笔记——第二期:初识Unity3D
- MD5算法的C语言实现