图片拉伸效果
CGFloat top = 0; // 顶端盖高度
CGFloat bottom = 0; // 底端盖高度
CGFloat left = 30; // 左端盖宽度
CGFloat right = 30; // 右端盖宽度
UIEdgeInsets insets = UIEdgeInsetsMake(top, left, bottom, right);
/*
* Stretch 拉伸
* Tile 平铺
*/
UIImage *image = [[UIImage imageNamed:@"pay_btn_bg"] resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch];
[button setBackgroundImage:image forState:UIControlStateNormal];











网友评论