SDAutoLayout
SDAutoLayout copied to clipboard
updateLayout 不应该直接调用 layoutSubviews
You should not call this method directly. If you want to force a layout update, call the setNeedsLayout() method instead to do so prior to the next drawing update. If you want to update the layout of your views immediately, call the layoutIfNeeded() method.
引用苹果文档原文https://developer.apple.com/documentation/uikit/uiview/1622482-layoutsubviews 这里改成这样会不会好一些?
[self.superView setNeedsLayout];
[self.superView layoutIfNeeded];