设置UIButton的文左图右
[btn.imageViewsetContentMode:UIViewContentModeScaleAspectFit];
//交换button中title和image的位置
CGFloatlabelWidth = btn.titleLabel.frame.size.width;
CGFloatimageWith = btn.imageView.frame.size.width;
btn.imageEdgeInsets=UIEdgeInsetsMake(0, labelWidth,0, -labelWidth);
btn.titleEdgeInsets=UIEdgeInsetsMake(0, -imageWith,0, imageWith);