button.contentHorizontalAlignment =UIControlContentHorizontalAlignmentLeft;button.contentHorizontalAlignment =UIControlContentHorizontalAlignmentRight; //枚举类型typedef NS_ENUM(NSInteger, UIControlContentHorizontalAlignment) { UIControlContentHorizontalAlignmentCenter = 0, UIControlContentHorizontalAlignmentLeft = 1, UIControlContentHorizontalAlignmentRight = 2, UIControlContentHorizontalAlignmentFill = 3,};