UIButton上的图片和文字位置调整:
属性: imageEdgeInsets
contentEdgeInsets
UIEdgeInsetsMake
Creates an edge inset for a button or view.
UIEdgeInsets UIEdgeInsetsMake (
CGFloat top,
CGFloat left,
CGFloat bottom,
CGFloat right
);
Parameters
top
The inset at the top of an object. 距离顶部的间隔
left
The inset on the left of an object 距离左边的间隔
bottom
The inset on the bottom of an object. 距离底部的间隔
right
The inset on the right of an object. 距离右边的间隔
属性: imageEdgeInsets
contentEdgeInsets
UIEdgeInsetsMake
Creates an edge inset for a button or view.
UIEdgeInsets UIEdgeInsetsMake (
CGFloat top,
CGFloat left,
CGFloat bottom,
CGFloat right
);
Parameters
top
The inset at the top of an object. 距离顶部的间隔
left
The inset on the left of an object 距离左边的间隔
bottom
The inset on the bottom of an object. 距离底部的间隔
right
The inset on the right of an object. 距离右边的间隔