首页 > 代码库 > 让button的文字换行和左对齐

让button的文字换行和左对齐

btn.titleLabel.numberOfLines = 0;
 
btn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
 
btn.titleEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);

让button的文字换行和左对齐