您的位置:首页 > 其它

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];

问题没有解决前的图片:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: