ios button 设置文字左对齐


button.titleLabel.textAlignment = NSTextAlignmentLeft; 这句无效

button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;

//距左的边距为10

button.titleEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);

你可能感兴趣的:(ios button 设置文字左对齐)