首页 > 其他 > 详细

第13天第12天 Constraints priority

时间:2017-10-12 16:46:25      阅读:211      评论:0      收藏:0      [点我收藏+]

1.Constraints priority

将evInputView的高度约束的priority设为750,evInputView的inputTextView如果不设高度约束,那么高度就是defaultInputViewH,如果设了高度,那么就是这个高度.

 

        evInputView.snp.remakeConstraints { (make) in

            make.left.right.equalTo(0)

            make.bottom.equalTo(bottom)

            make.height.equalTo(defaultInputViewH).priority(750)

        }

 

 

        inputTextView.snp.remakeConstraints { (make) in

            make.top.equalTo(textViewFrame.top)

            make.bottom.equalTo(textViewFrame.bottom)

            make.left.equalTo(textViewFrame.left)

            make.right.equalTo(textViewFrame.right)

        }

 

        inputTextView.snp.remakeConstraints { (make) in

            make.top.equalTo(textViewFrame.top)

            make.bottom.equalTo(textViewFrame.bottom)

            make.left.equalTo(textViewFrame.left)

            make.right.equalTo(textViewFrame.right)

            make.height.equalTo(height)

        }

 

 

https://segmentfault.com/a/1190000004650551

https://github.com/February12/YLBaseChat/

第13天第12天 Constraints priority

原文:http://www.cnblogs.com/javastart/p/7656679.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!