button 文字靠左 内容偏移

       

       [self.intoBtn setTitle:title forState:UIControlStateNormal];

        self.intoBtn.backgroundColor = KFontBlackColor2;

        self.intoBtn.titleLabel.font = [UIFont systemFontOfSize:15];

        self.intoBtn.titleLabel.numberOfLines = 0;

       // 文字居左

        self.intoBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;

        //内容偏移  

        self.intoBtn.contentEdgeInsets = UIEdgeInsetsMake(0, 10, 0, 0);



你可能感兴趣的:(iOS)