button上的图片显示蓝色
2015-09-01 15:05
190 查看
UIButton *headImg = [UIButton
buttonWithType:UIButtonTypeCustom];
headImg.frame =
CGRectMake((UISCREEN_WIDTH-60)/2,
5, 60,
60);
[headImg
setImage:[UIImage
imageNamed:@"我的.png"]
forState:UIControlStateNormal];
headImg.layer.masksToBounds =
YES;
headImg.layer.cornerRadius =
30;
headImg.layer.borderWidth =
1;
headImg.layer.borderColor = [UIColor
redColor].CGColor;
headImg.tag =
2;
[headImg
addTarget:self action:@selector(gotoView:) forControlEvents:UIControlEventTouchUpInside];
[self.view
addSubview:headImg];
问题没有解决前的图片:
buttonWithType:UIButtonTypeCustom];
headImg.frame =
CGRectMake((UISCREEN_WIDTH-60)/2,
5, 60,
60);
[headImg
setImage:[UIImage
imageNamed:@"我的.png"]
forState:UIControlStateNormal];
headImg.layer.masksToBounds =
YES;
headImg.layer.cornerRadius =
30;
headImg.layer.borderWidth =
1;
headImg.layer.borderColor = [UIColor
redColor].CGColor;
headImg.tag =
2;
[headImg
addTarget:self action:@selector(gotoView:) forControlEvents:UIControlEventTouchUpInside];
[self.view
addSubview:headImg];
问题没有解决前的图片:
相关文章推荐
- 新学期 开学‘礼’- 迅为iTOP-4412开发板 初学嵌入式首选
- spring学习笔记:Spring IOC容器
- MFC之树形控件Tree Control
- BZOJ 3931: [CQOI2015]网络吞吐量 最大流
- Git 使用规范流程
- LeetCode -- Triangle 路径求最小和( 动态规划问题)
- TUTK p2p视频流H.264 iOS平台解码成功
- 【腾讯开放平台】Android、IOS实现指定QQ临时会话功能
- LeetCode -- WordBreak II
- idea快捷键
- hdu5416 树上XOR
- C++基础篇--运算符重载
- 技术文章
- Unreal Engine API Reference
- 软工视频第三章之需求分析
- 游戏服务器主程白皮书-3.1 运行稳定性
- MySql之慢查询
- Windows远程桌面连接的利器-mRemote
- Git+gerrit user guide
- Mongodb installation & userguide