在IOS AutoLayout中调用两个方法的顺序:updateConstraints和updateViewConstraints

在IOS AutoLayout中调用两个方法的顺序:updateConstraints和updateViewConstraints,ios,objective-c,autolayout,Ios,Objective C,Autolayout,我被告知:“当您通过调用setNeedsUpdateConstraints或updateConstraints if needed告诉autolayout视图的约束需要刷新时,它首先在该视图上调用updateConstraints,然后在相应的视图控制器上调用updateViewConstraints。” 但是我做了一个测试,结果是第一次调用了updateViewConstraints,我有什么问题吗?没有,你没事,你被误报了。好的,一开始我想我忽略了一些条件来测试它

我被告知:“当您通过调用
setNeedsUpdateConstraints
updateConstraints if needed
告诉autolayout视图的约束需要刷新时,它首先在该视图上调用
updateConstraints
,然后在相应的视图控制器上调用
updateViewConstraints
。”
但是我做了一个测试,结果是第一次调用了
updateViewConstraints
,我有什么问题吗?

没有,你没事,你被误报了。好的,一开始我想我忽略了一些条件来测试它