如何将 NSlayout 约束转换为整数?

How to convert NSlayout constraint to integer?

我想将 20 个常量值附加到 nslayoutconstraint,我该怎么做??

Let moduleConstraint = module.bottomAnchor.constraint(equalTo:mainScroll.safeAreaLayoutGuide.bottomAnchor)

你可以试试

moduleConstraint.constant += 20
view.layoutIfNeeded() // refresh the layout