注意:当一个按钮上既有文字又有图标时,可以用于调整文字和图标的位置。
btn.frame = CGRectMake(_label1.frame.origin.x+_label1.frame.size.width+10,_label1.frame.origin.y+40*i,90, 25);
btn.titleEdgeInsets = UIEdgeInsetsMake(3,-62, 2, 0);
btn.imageEdgeInsets = UIEdgeInsetsMake(2, 64, 2, 2);
btn.frame = CGRectMake(_label1.frame.origin.x+_label1.frame.size.width+10,_label1.frame.origin.y+40*i,90, 25);
btn.titleEdgeInsets = UIEdgeInsetsMake(3,-62, 2, 0);
btn.imageEdgeInsets = UIEdgeInsetsMake(2, 64, 2, 2);