标签:label horizon enter 左右 idt image content bsp bounds
代码都是从自己用到从网上找来的 这些我用的没问题 储存下来
左右改变
[btn setTitleEdgeInsets:UIEdgeInsetsMake(0, -btn.imageView.bounds.size.width, 0, btn.imageView.bounds.size.width)];
[btn setImageEdgeInsets:UIEdgeInsetsMake(0, btn.titleLabel.bounds.size.width, 0, -btn.titleLabel.bounds.size.width)];
上下改变
btn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
[btn setTitleEdgeInsets:UIEdgeInsetsMake(btn.imageView.frame.size.height+10,-btn.imageView.frame.size.width, 0.0,0.0)];
[btn setImageEdgeInsets:UIEdgeInsetsMake(-10, 0.0,0.0, -btn.titleLabel.bounds.size.width)];
标签:label horizon enter 左右 idt image content bsp bounds
原文地址:http://www.cnblogs.com/xiaodeng90/p/7773180.html