Now I want to alignment the text of button to the left with code , how to do ? and I code this :
button.titleLabel.textAlignment = UITextAlignmentLeft;
Use ContentHorizontalAlignment as below
ContentHorizontalAlignment
btnObj.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;