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热区的方法哟
让明天,不后悔今天的所作所为
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了