[self.cancleButton setContentCompressionResistancePriority:UILayoutPriorityRequired
forAxis:UILayoutConstraintAxisHorizontal];
例如:
左右按钮随文字width变化,中间的title的width随左后按钮的width
[self.cancleButton setContentCompressionResistancePriority:751 forAxis:UILayoutConstraintAxisHorizontal];
[self.cancleButton setContentHuggingPriority:300 forAxis:UILayoutConstraintAxisHorizontal];
[self.confirmButton setContentCompressionResistancePriority:751 forAxis:UILayoutConstraintAxisHorizontal];
[self.confirmButton setContentHuggingPriority:300 forAxis:UILayoutConstraintAxisHorizontal];
[self.titleLabel setContentCompressionResistancePriority:749 forAxis:UILayoutConstraintAxisHorizontal];