对于代码创建的UIView,将下面的选项关掉 [label3 setTranslatesAutoresizingMaskIntoConstraints:NO]; 转载于:https://www.cnblogs.com/yibinpan/p/4431998.html