放大Button热区的方法哟

1 //添加图片不能用backgroundimage
2 [btn setImage:image5 forState:0];
3 
4 //然后
5 btn.imageEdgeInsets = UIEdgeInsetsMake(20,20,20,20);
6 btn.titleEdgeInsets = UIEdgeInsetsMake(20,20,20,20);
7 
8 //然后OK了

 

你可能感兴趣的:(放大Button热区的方法哟)