标签:
NSLayoutConstraint *con = [NSLayoutConstraint constraintWithItem:self.workBgView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:workCalendar attribute:NSLayoutAttributeBottom multiplier:1 constant:10];
[_scrollView addConstraint:con];
_scrollView是一个父视图,它上面有两个子视图:workBgView和workCalendar,这个约束是在workBgView上添加一个垂直方向的视图,与workCalendar底部的距离约束值为10.
标签:
原文地址:http://www.cnblogs.com/shilang2015/p/5062629.html