UIButton设置左文字右图片
os8下 文字和图片重叠了,该怎么处理?原来的代码如下
_qyButton = [UIButton buttonWithType:UIButtonTypeCustom];
_qyButton.frame = CGRectMake(0, 0, kDeviceWidth/3-4, 40);
[_qyButton setTitle:[_qyArray objectAtIndex:0] forState:UIControlStateNormal];
[_qyButton layoutIfNeeded];//添加刷新布局
[_qyButton setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
[_qyButton addTarget:self action:@selector(changeQy:) forControlEvents:UIControlEventTouchUpInside];
[_qyButton setImage:[UIImage imageNamed:@"arrow_down"] forState:UIControlStateNormal];
[_qyButton setTitleEdgeInsets:UIEdgeInsetsMake(0, 10, 0, 10)];
[_qyButton setImageEdgeInsets:UIEdgeInsetsMake(0, _qyButton.titleLabel.bounds.size.width+paddingWidth,0, -_qyButton.titleLabel.bounds.size.width-paddingWidth)];